TetrisFigure implements Figure, Cloneable { @Override public int[] getRowCodes(boolean ignoreColors) { if (ignoreColors) { return uncoloredCodes; } return codes; } @Deprecated  TetrisFigure(); @Deprecated  TetrisFigure(int centerX, int centerY, String... rows);  TetrisFigure(int centerX, int centerY, Type type, String... rows); int getLeft(); int getRight(); int getTop(); int getBottom(); @Override int[] getRowCodes(boolean ignoreColors); Figure rotate(int times); @Override int getWidth(); @Override Figure getCopy(); @Override Type getType(); public String[] rows; }
@Test public void shouldParseRowCodesWhenColorCyan() { TetrisFigure figure = new TetrisFigure(0, 0, Figure.Type.J, "#"); assertThat(figure.getRowCodes(false)).isEqualTo(new int[]{0b010}); }