Browse Source

4gewinnt: added setter/getter for player2Score

4gewinnt
Steffen Helmke 3 years ago
committed by Lorenz Hohmann
parent
commit
f42de527a2
  1. 9
      src/main/java/de/tims/viergewinnt/ai/Logic.java

9
src/main/java/de/tims/viergewinnt/ai/Logic.java

@ -16,6 +16,7 @@ public class Logic {
private int[][] board = new int[6][6];
private int currentPlayer = 1;
private int player1Score = 0;
private int player2Score = 0;
public void setField(int player, int row, int column) {
board[row][column] = player;
@ -41,6 +42,14 @@ public class Logic {
return player1Score;
}
public void setPlayer2Score(int score) {
player2Score = score;
}
public int getPlayer2Score() {
return player2Score;
}
public int playChip(int column) {
//add board update

Loading…
Cancel
Save