Added many comments, still more to go, fixed some spelling mistakes.

Modified hard algorthm, it now does a proper check for the end trap and blocks
it in a way that should not allow a win. So far, AI is unbeatable.