The third requirement relates to the game logic.
These tests cover the verification of the new functionality. For the sake of simplicity, the red player will always start the game:
@Test public void whenFirstPlayerPlaysThenDiscColorIsRed() { assertThat(tested.getCurrentPlayer(), is("R")); } @Test public void whenSecondPlayerPlaysThenDiscColorIsRed() { int column = 1; tested.putDiscInColumn(column); assertThat(tested.getCurrentPlayer(), is("G")); }
A couple of methods need to be created to cover this functionality. The switchPlayer method ...