updateBoard() now handles all invalid inputs