So I have the NIM Game Program. Basically, there are four piles and the two players have to keep taking stones from the piles until one of them lose. Right now my piles look like this in the output.
Board: [1, 2, 3, 4]
XXX|XXX represents one stone and one column of them represent a pile but I need to modify it so it will look like this
XXX|XXX
XXX|XXX XXX|XXX
XXX|XXX XXX|XXX XXX|XXX
XXX|XXX XXX|XXX XXX|XXX XXX|XXX
This is my code
System.out.print("");
for(int i = 0; i < 4; i++) {
//System.out.println(i);
for(int j = 0; j < numbers[i];j++) {
//System.out.println(j);
System.out.print(" XXX|XXX ");
}
System.out.println(" ");
}
it prints this
XXX|XXX
XXX|XXX XXX|XXX
XXX|XXX XXX|XXX XXX|XXX
XXX|XXX XXX|XXX XXX|XXX XXX|XXX
suggestons?