Fixed a small bug preventing the AI from selecting cells on the edge of the board.