Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public Square getSquareAtPosition(Position position){
  2.  
  3. int posrow = position.getrow();//ligne
  4. int poscolumn = position.getcolumn();//colone
  5. if (this.squares[posrow][poscolumn] == null) {
  6. throw new IllegalArgumentException("Hors du plateau");
  7. } else {
  8. return this.squares[position.getrow()][position.getcolumn()];
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement