thread synchronized collection all together
807605Aug 14 2007 — edited Aug 15 2007Hi guys.
I have an object Zoo. It has a collection with monkeys. Each monkey has it's own thread. Monkey can move on 2d platform(in 8 directions, x y-coordinates). When monkey wants to move she asked if field is free.
The problem is... that if two monkies wants to go to the same position, they do it:(
P.S. synchronized move() - all the same:(