Made Board.isValid method more readable.