deals with consecutive AI moves

also trim all read input
fixed typo, should now deal with AI not being able to move