Implementation of tic tac toe.