@ -103,6 +103,10 @@ public class GameLogic implements ActionListener {
public boolean checkEndOfGame() {
return checkForWin(PLAYER_1) || checkForWin(PLAYER_2);
}
public char getCurrentPlayer() {
return 'x';
public JPanel generateGUI() {
this.fields = new JButton[this.board.length][this.board.length];
@ -81,6 +81,14 @@ class GameLogicTest {
assertEquals(expectedResult, realResult);
@Test
void getCurrentPlayerTest() {
char expectedResult = game.getCurrentPlayer();
char realResult = 'x';
@ParameterizedTest(name = "[{index}] {0} -> {2} fields")
@MethodSource("testCasesForCountPlayfields")
void fieldCountTest(String testName, int size, int expectedResult) {