Made AI check for winning moves and losing moves(Not tested)