I am amking a Tic Tac Toe game and have a one dimensional array (0-8 for the nine spaces). How can I check with the smallest and most efficient amount of code whether or not someone has won the game, or if it's a draw?

Much thanks in advance.