Finish AI

FIx a bug in game(clear bar)