Presumably solved the issue where AI makes wrong moves.

Added a method that checks for immediate wins/losses.
This commit is full od debugging messages. Only committing
to save progress.