The rules of TicTacToe state that if one player or the other marks three sequential spaces, a row, column or diagonal, that player wins. We will do this using brute force. The iswin() function will take one argument. This is the letter to check for, either X or O. It will set a local variable to 1 or 2 and use this in the checking. There will be a separate if statement for each row, column and diagonal. If none of these match, it returns false. We will call this check after each move and display a message in the result span if someone has won.