File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes After some advice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "After some advice" Watch "After some advice" New topic
Author

After some advice

Steven Gibbs
Greenhorn

Joined: Apr 24, 2006
Posts: 29
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

Joined: Aug 31, 2004
Posts: 11343

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.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: After some advice