Use the winner method to check if someone has won a tic-tac-toe game.