commit
This commit is contained in:
parent
dcf6c1fdf5
commit
7b8b996a98
2 changed files with 17 additions and 16 deletions
|
@ -8,8 +8,8 @@ public class AppLaser {
|
||||||
int start_i = 3;
|
int start_i = 3;
|
||||||
int start_j = 1;
|
int start_j = 1;
|
||||||
int start_dir = 11;
|
int start_dir = 11;
|
||||||
int universe_width = 6;
|
int universe_width = 30;
|
||||||
int universe_height = 6;
|
int universe_height = 12;
|
||||||
int firstState_i = start_i;
|
int firstState_i = start_i;
|
||||||
int firstState_j = start_j;
|
int firstState_j = start_j;
|
||||||
|
|
||||||
|
@ -26,10 +26,11 @@ public class AppLaser {
|
||||||
|
|
||||||
// obstacles creation
|
// obstacles creation
|
||||||
|
|
||||||
universe.addObstacle(2, 3);
|
//universe.addObstacle(3, 3);
|
||||||
universe.addObstacle(3, 3);
|
//universe.addObstacle(4, 3);
|
||||||
universe.addObstacle(2, 4);
|
//universe.addObstacle(3, 4);
|
||||||
universe.addObstacle(3, 4);
|
//universe.addObstacle(4, 4);
|
||||||
|
//universe.addObstacle(12, 5);
|
||||||
|
|
||||||
universe.print();
|
universe.print();
|
||||||
|
|
||||||
|
|
|
@ -191,43 +191,43 @@ public class Universe {
|
||||||
for (j = 0; j < this.width; j++) {
|
for (j = 0; j < this.width; j++) {
|
||||||
switch (this.grid[i][j]) {
|
switch (this.grid[i][j]) {
|
||||||
case -1:
|
case -1:
|
||||||
System.out.printf(" X");
|
System.out.printf(" X");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
System.out.printf(" ");
|
System.out.printf(" ");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
System.out.printf(" |");
|
System.out.printf(" |");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
System.out.printf(" -");
|
System.out.printf(" -");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
System.out.printf(" /");
|
System.out.printf(" /");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
System.out.printf(" \\");
|
System.out.printf(" \\");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
System.out.printf(" ^");
|
System.out.printf(" ^");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
System.out.printf(" v");
|
System.out.printf(" v");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
System.out.printf(" >");
|
System.out.printf(" >");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
System.out.printf(" <");
|
System.out.printf(" <");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue