I am basically making this java program about a tile game for the user to interact with. This is one of the 6 classes and I need a variable to keep track of the tiles. How do I do that?
/*
* Activity 8.2 Tester File
*/
public class TileTester {
private static String[] tileValues = {
"lion", "lion",
"penguin", "penguin",
"dolphin", "dolphin",
"fox", "fox",
"monkey", "monkey",
"turtle", "turtle"};
public static void main(String[] args) {
/*2d array*/
String[][] gameBoard = {{"lion", "lion", "penguin", "penguin"},
{"dolphin", "dolphin", "fox", "fox"},
{"monkey", "monkey", "turtle", "turtle"}};
/*nested for loop*/
for (int row = 0; row < gameBoard.length; row++) {
for (int column = 0; column < gameBoard[0].length; column++) {
System.out.println(gameBoard[row][column]);
}
}
}
}