hi,
when you have this for example:
String[][] table = new String[4][4]; table[0][0] = ". "; table[0][1] = ". "; table[0][2] = ". "; table[0][3] = ". "; table[1][0] = ". "; table[1][1] = ". "; table[1][2] = ". "; table[1][3] = ". "; table[2][0] = ". "; table[2][1] = ". "; table[2][2] = ". "; table[2][3] = ". "; table[3][0] = ". "; table[3][1] = ". "; table[3][2] = ". "; table[3][3] = ". ";
which is printed like this:
. . . .
. . . .
. . . .
. . . .
is there a way to move around the board?
kinda like this:
table[1][1] = snake; //move is input switch (move) { case "a": table[]([]--)
so when you input "a", the snake (which is an o instead of a .) stays in the same primary table but decreases in the secondary table.
e.g. original location table[1][1]
input a: table[1][0]
it would look like this:
. . . .
o. . .
. . . .
any ideas?
iam pretty new to Java and programming at all, so i thought to making a command prompt snake game would be fun, iam planning to add random apple generation, eating them etc..
and, is there a way to determine the current table the snake is in?
so i can say current snake location becomes a . again once the snake moves?