I wondering if anyone can help me with the best way to store
information. I am creating a version of Monopoly. In this
game there are 40
boxes of which only 30 can be either owned by "Mr Monopoly"
The first colour on the monopoly board is brown, then blue
then pink. There
are 2 brown boxes b1 or b2, either could be owned by
MrMonopoly or Player1.
I would like to create a data structure that can easily be
a box is bought and interrogated to return whether the
current player owns
none some or all of the boxes of that colour.
At any one time the token knows the number of the box on the
board it is
currently on, what's its colour is and whether it is owned by
or "Player1". The number of box colour groups are always
constant but not
always concurrent. For example Brown would not be piece 1 and
2 on the
board as they are separated by "Community Chest".
I think it would be an array of 40 boxes and when the token
lands on a box
it identifies what colour of box it lands on and then checks
the array to
see if this player owns none, some or all of the boxes of
that colour in the
Owner = new Array(0,1,0,1,0,2,0,3,0,3,0,0,2) etc....
where 0 is non - ownable box; 1 is brown pieces; 2 are
ownable airports (of
which there are 4); 3 is a blue.
So I am some how trying to show that all the browns are owned
by this player
or all the blues, etc... and something happens after that.
I would like to thank you staying with this long post but I