Added and implemented OnBoard function

Replaced all if (coord.getX() < 1 || coord.getY() < 1 || coord.getX() > 8|| coord.getY() > 8) with if (OnBoard(coord) == false)