Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

After some advice

 
Steven Gibbs
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Steven Gibbs:
...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? ...

One drawback to arrays is that their size is established when they are created, and they cannot be resized. I suspect your supervisor was considering a Collection instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic