Algorithm that detects a winning state in a simple two dimentional array representation of tic-tac-toe.