File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trying to understand array

 
Dheesan Dabycharun
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

am new in java, trying to make a game of snakes n ladders, understood that an array like the below should be to make my board and image work together.
Am using an image with nos 1 to 100 designed on the boardfield.

boardfield = new Field[10][10];
for (int i = 0; i<10; i++){
for (int j = 0; j<10; j++){
boardfield[i][j] = new Field();
}
}

But i can't really understand how to make my image and my array can work together.
Anyone can advise me if i am going on the right track if i post the code here?

Tks in advance.
 
Sagar Rohankar
Ranch Hand
Posts: 2905
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dheesan Dabycharun wrote:But i can't really understand how to make my image and my array can work together.

Of course, you can add one more instance variable into class 'Field' which hold image for that board.

And welcome to JR.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic