From 85e8867e06e7d7250e65c406ab53b0cc9b039544 Mon Sep 17 00:00:00 2001 From: Malte Schellhardt Date: Wed, 9 Feb 2022 16:12:35 +0100 Subject: [PATCH] tictactoe: refactored fieldIsEmpty method --- src/main/java/de/tims/tictactoe/GameLogic.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/de/tims/tictactoe/GameLogic.java b/src/main/java/de/tims/tictactoe/GameLogic.java index 8c40bdb..7beb042 100644 --- a/src/main/java/de/tims/tictactoe/GameLogic.java +++ b/src/main/java/de/tims/tictactoe/GameLogic.java @@ -37,12 +37,7 @@ public class GameLogic { } public boolean fieldIsEmpty(int column, int row) { - if (this.board[column][row] == emptyField) { - System.out.println(Arrays.toString(this.board)); - return true; - } else { - return false; - } + return (this.board[column][row] == emptyField) ? true : false; } }