Update board.py

Just check the out of range input