Finished AI and major game logic