#Help making a class that will display my tiles in a grid

11 messages · Page 1 of 1 (latest)

hallow radish
#

I tried using this but it wont display the tile in its position

molten forgeBOT
#

This post has been reserved for your question.

Hey @hallow radish! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

hallow radish
#

for (int i = 1; i < 91; i++){
if (i<10){
System.out.println(i + " |");
} else {
System.out.println(i + "|");
}
if (i == 91){
System.out.println();
}
for (int j = 1; j < 91; j++){
if (test.get(i,j) != null){
System.out.print(test.get(i,j).toString());
}
if (i == 90){
if (j == 1){
System.out.print(" " + j + " ");
} else {
System.out.print(j + " ");
}
}
}
}

#

the for loop im using to display

#

its supposed to display the tile in position i,j

#

but wont work

misty ridge
#

is the board size 90 x 90?

hallow radish
#

yeah @misty ridge

#

I thought about making a String[][]

#

and filling it with spaces or with tiles depending on if its a null or no