Advertisement
Llorens

Untitled

Dec 26th, 2024
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. public Cell shot2() {
  2.         final char[] userInput = Utils.readLineThroughKeyboard();
  3.  
  4.         int row = userInput[0] - 'A';
  5.         int column = userInput[1] - '0' - 1;
  6.         if (userInput.length > 2) {
  7.             column = 9 + (userInput[2]  - '0');
  8.         }
  9.  
  10.         return new Cell(row, column);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement