simple pythonic implementation of tic tac toe