Fixed errors, checks out of bounds

Added a private method to help me check if the location would be out 
of bounds then so the code now checks if the next move is out of 
bounds and fixed a few errors I saw