From caf11d2ee21adacea011731ef1ed28408b37df4b Mon Sep 17 00:00:00 2001 From: Steffen Helmke Date: Tue, 18 Jan 2022 19:59:07 +0100 Subject: [PATCH] 4gewinnt: refactored setter and getter --- src/main/java/de/tims/viergewinnt/ai/Logic.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/tims/viergewinnt/ai/Logic.java b/src/main/java/de/tims/viergewinnt/ai/Logic.java index 5135a1c..c557bbc 100644 --- a/src/main/java/de/tims/viergewinnt/ai/Logic.java +++ b/src/main/java/de/tims/viergewinnt/ai/Logic.java @@ -23,11 +23,11 @@ public class Logic { } public void setField(int player, int row, int column) { - board[row][column] = player; + this.board[row][column] = player; } public int getField(int row, int column) { - return board[row][column]; + return this.board[row][column]; } public int getBoardSize() { @@ -35,27 +35,27 @@ public class Logic { } public void setCurrentPlayer(int player) { - currentPlayer = player; + this.currentPlayer = player; } public int getCurrentPlayer() { - return currentPlayer; + return this.currentPlayer; } public void setPlayer1Score(int score) { - player1Score = score; + this.player1Score = score; } public int getPlayer1Score() { - return player1Score; + return this.player1Score; } public void setPlayer2Score(int score) { - player2Score = score; + this.player2Score = score; } public int getPlayer2Score() { - return player2Score; + return this.player2Score; } public int playChip(int column) {