mirror of
https://github.com/lov3b/Schack.git
synced 2025-01-18 21: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) {
|
} catch (NullPointerException npe) {
|
||||||
// This is an empty spot
|
// This is an empty spot
|
||||||
movable.add(pos);
|
movable.add(pos);
|
||||||
} catch (Exception e) {
|
} catch (IndexOutOfBoundsException e) {
|
||||||
// This means that the player is at the edge
|
// This means that the player is at the edge
|
||||||
}
|
}
|
||||||
|
catch (Exception e){
|
||||||
|
// For good meassure
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user