Changed Board::getRandomMove to get a random move then check if it is legal instead of getting all legal moves and then getting a random one