Added function to tell if coordinates are on the board