Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

After some Advice

Hi there folks.

Have a quick question for you.

I am going to be making the Rush Hour game as part of my honours project and then later making a solver using the A* Algorithm.

My supervisor has asked me to look at the game side of things just now ie. how the board can be stored and how each move made by the player would be stored, current position, new position that sort of thing.

First thing I thought of was an array but my supervisor said yes it will work but there are better ways of doing it.

Anyone have any ideas of what I can use so that I can research it more?

Haven't done Java in a year so i'm a bit rusty.

Thanks in advance.
[711 byte] By [geebs2006] at [2007-11-11 11:57:38]
# 1 Re: After some Advice
Can't you write a Player class which stores a player's state information? Then you can push each "state" onto a queue which could be unraveled to "back up" play.

I have written "board" type games using 2D bitarrays to store 2D board information (locations visited, location of treasures, location of hazards, etc.).
nspils at 2007-11-11 22:30:21 >