For a TicTacToe game below, everything works well but in the same block of code, I use these lines twice:
if (playerhasWon()) { declareWinner()