AI working, need to fix some end of game bugs