This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Text Based Game Board Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Text Based Game Board" Watch "Text Based Game Board" New topic
Author

Text Based Game Board

william rapa
Greenhorn

Joined: Sep 30, 2010
Posts: 5
I am trying to make a text based Game board running out of my console. Whats a good way to make this game board and make it able to save pieces on it. I have a few ideas but I am unsure about it. I was thinking of a board made form a double array but I am unsure how to save my pieces into it.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Hi Patrick and welcome to the JavaRanch.

I would not use an array but create a class Board. Internally you can use an array of course.
Here you can read all about arrays.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
william rapa
Greenhorn

Joined: Sep 30, 2010
Posts: 5
Any tips on what would be a good alternative?
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

I would stick with arrays. They iterate easily and can have a square shape matching the board.
william rapa
Greenhorn

Joined: Sep 30, 2010
Posts: 5
Okay ill give it a try thank you.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

You're welcome and good luck.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Text Based Game Board