Added enemyID functionality
This commit is contained in:
parent
2a5a6efd59
commit
a3a1da1d9a
|
@ -68,6 +68,9 @@ public class Game {
|
|||
this.hist = new GameHistory();
|
||||
this.board = new int [GAME_COLUMNS][GAME_ROWS];
|
||||
this.gameOn = false;
|
||||
// Set enemy IDs
|
||||
this.p1.setEnemyID(2);
|
||||
this.p2.setEnemyID(1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,7 @@ public class PlayerObject {
|
|||
|
||||
private final Player p;
|
||||
private final int id;
|
||||
private int enemyID;
|
||||
private String sym;
|
||||
|
||||
/**
|
||||
|
@ -37,6 +38,11 @@ public class PlayerObject {
|
|||
return this.p;
|
||||
}
|
||||
|
||||
public void setEnemyID(int id) {
|
||||
this.enemyID = id;
|
||||
this.p.setEnemyID(id);
|
||||
}
|
||||
|
||||
public int getID() {
|
||||
return this.id;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue