improved display
This commit is contained in:
parent
8f4421bc12
commit
a5090c2bcf
2 changed files with 12 additions and 8 deletions
|
@ -210,10 +210,11 @@ public class Universe {
|
|||
return this.boxes_to_fill == 0;
|
||||
}
|
||||
|
||||
public void print() {
|
||||
public void print(int pos_i, int pos_j) {
|
||||
int i, j;
|
||||
for (i = 0; i < this.height; i++) {
|
||||
for (j = 0; j < this.width; j++) {
|
||||
System.out.print("\033[" + (i + pos_i) + ";" + (j*2 + pos_j) + "H");
|
||||
switch (this.grid[i][j]) {
|
||||
case -1:
|
||||
System.out.printf(" X");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue