Capturing input and checking if the input is a valid one. Also showing messages below the board.