@Test public void shouldParseOneRowBoard() throws Exception { char[][] board = new char[][]{ {'X', '.'} }; Cell rootCell = Parser.boardToRootCell(board); assertThat(rootCell.couldBePartOfShip(), is(true)); assertThat(rootCell.getRight().couldBePartOfShip(), is(false)); }
public static Cell boardToRootCell(char[][] board) { return createCellAndNeighbors(0, 0, board, createCellsCache(board)); }
Parser { public static Cell boardToRootCell(char[][] board) { return createCellAndNeighbors(0, 0, board, createCellsCache(board)); } }
Parser { public static Cell boardToRootCell(char[][] board) { return createCellAndNeighbors(0, 0, board, createCellsCache(board)); } private  Parser(); }
Parser { public static Cell boardToRootCell(char[][] board) { return createCellAndNeighbors(0, 0, board, createCellsCache(board)); } private  Parser(); static Cell boardToRootCell(char[][] board); }
Parser { public static Cell boardToRootCell(char[][] board) { return createCellAndNeighbors(0, 0, board, createCellsCache(board)); } private  Parser(); static Cell boardToRootCell(char[][] board);  }