mirror of
https://github.com/lov3b/Schack.git
synced 2024-11-10 07:00:11 +01:00
Added Exception check in try-catch
This commit is contained in:
parent
e719cf48fe
commit
129ddfb09d
@ -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;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user