Good point, I didn't think about that for some reason.
Yes I will give it a read, thanks for the link!
On Friday, July 19, 2013 6:19:03 PM UTC+2, Mikera wrote:
>
> If you want to do in in "pure functional style" then I would suggest a
> single atom / ref that contains the whole game state (inclu
I'll second that you are usually doing something unidiomatic if you're
using refs of refs.
On Fri, Jul 19, 2013 at 2:44 PM, vis wrote:
> Good point, I didn't think about that for some reason.
> Yes I will give it a read, thanks for the link!
>
>
> On Friday, July 19, 2013 6:19:03 PM UTC+2, Miker
Hey guys,
I am playing around with a gameserver in clojure, here is the situation:
- I have a *ref of a hashmap that holds refs of players*
- I have a *ref of a hashmap that holds refs of monsters*
I used "refs of players" and "refs of monsters" because at some point I
might have to transfer thin
Note: what concerns me about using a* ref of a hashmap that holds agents of
monsters* is that I would loose the transaction benefits of the ref (hence
I can't safely move items from a player to a monster).
--
--
You received this message because you are subscribed to the Google
Groups "Clojure
If you want to do in in "pure functional style" then I would suggest a
single atom / ref that contains the whole game state (including monsters,
players, map, items etc.)
That's the approach I've taken in the two Clojure games I've written so
far, and it has worked pretty well. You might be int