wolfenste / tictactoe

0 stars 0 forks source link

getGameStatus should not return magic constants #11

Closed flavius closed 6 years ago

flavius commented 6 years ago

This line

$this->assertEquals ($game->getGameStatus (), 'end');

reveals a new concept "game status". Instead of returning a magic constant like 'end', it's better to make this hidden concept obvious in the code: create a GameStatus value object.