Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Square getSquareAtPosition(Position position){
- int posrow = position.getrow();//ligne
- int poscolumn = position.getcolumn();//colone
- if (this.squares[posrow][poscolumn] == null) {
- throw new IllegalArgumentException("Hors du plateau");
- } else {
- return this.squares[position.getrow()][position.getcolumn()];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement