tests/GameOfLife/GameLogicTest.php
/**
     * Checks whether an empty board can be detected by the game logic.
     *
     * @covers \GameOfLife\GameLogic::isBoardEmpty()
     */
Checks whether an empty board can be detected by the game logic.
Checks whether an empty board can be detected by the game logic .
public function testCanDetectEmptyBoard()
    {
        $board = new Board(1, 1, 2, true);
        $gameLogic = new GameLogic(new ConwayRule());
        $this->assertTrue($gameLogic->isBoardEmpty($board));
        $board->setField(0, 0, true);
        $this->assertFalse($gameLogic->isBoardEmpty($board));
    }
public function testCanDetectEmptyBoard ( ) { $ board = new Board ( 1 , 1 , 2 , true ) ; $ gameLogic = new GameLogic ( new ConwayRule ( ) ) ; $ this -> assertTrue ( $ gameLogic -> isBoardEmpty ( $ board ) ) ; $ board -> setField ( 0 , 0 , true ) ; $ this -> assertFalse ( $ gameLogic -> isBoardEmpty ( $ board ) ) ; }
Checks whether an empty board can be detected by the game logic.
Checks whether an empty board can be detected by the game logic .