added logic to tictactoe.py so ai does not allow human to win

tictactoe.py is still command line but will be performance tested (next
stage) before being made into a ‘web app’ with both client and server
pieces integrated