Mouse4TheTurtle / EpicHackerMann

h
0 stars 0 forks source link

Null Pointer Exception in validMove method #1

Closed Mouse4TheTurtle closed 5 years ago

Mouse4TheTurtle commented 5 years ago

Need to figure out why this error is being thrown.

Exception in thread "main" java.lang.NullPointerException
    at Board.validMove(Board.java:69)
    at Board.movePiece(Board.java:81)
    at Game.main(Game.java:26)

Error is thrown when a pawn is moved.

Mouse4TheTurtle commented 5 years ago

It seems to be an error in the pawn's Movement array.

Mouse4TheTurtle commented 5 years ago

Problem pinpointed to firstMove variable, meant to allow pawns to move 2 spaces ahead on their first move.

Mouse4TheTurtle commented 5 years ago

Issue combined with Issue #4