Added Exception check in try-catch

This commit is contained in:
lov3b 2022-03-22 16:09:10 +01:00
parent e719cf48fe
commit 129ddfb09d

View File

@ -78,9 +78,12 @@ public abstract class Piece extends Component {
} catch (NullPointerException npe) {
// This is an empty spot
movable.add(pos);
} catch (Exception e) {
} catch (IndexOutOfBoundsException e) {
// This means that the player is at the edge
}
catch (Exception e){
// For good meassure
}
return false;
}