@Test public void testItemsHaveTheRightColor() { SpeedupItem speedupItem = new SpeedupItem(0, 0, 10); assertThat(speedupItem.getColorId(), is(R.color.colorExitRed)); SlowdownItem slowdownItem = new SlowdownItem(0, 0, 10); assertThat(slowdownItem.getColorId(), is(R.color.colorGreen)); SwapAxisItem swapAxisItem = new SwapAxisItem(0, 0, 10); assertThat(swapAxisItem.getColorId(), is(R.color.colorExitRed)); AddStarsItem addStarsItem = new AddStarsItem(0, 0, 10); assertThat(addStarsItem.getColorId(), is(R.color.colorGreen)); BumpingItem bumpingItem = new BumpingItem(0, 0, 10); assertThat(bumpingItem.getColorId(), is(R.color.colorExitRed)); }
public int getColorId() { return R.color.colorExitRed; }
Item { public int getColorId() { return R.color.colorExitRed; } }
Item { public int getColorId() { return R.color.colorExitRed; } Item(int posX, int posY, int radius); }
Item { public int getColorId() { return R.color.colorExitRed; } Item(int posX, int posY, int radius); int getX(); int getY(); int getRadius(); boolean collision(PaintView paintView); abstract void activate(final PaintView paintView); abstract String getTextFeedback(); int getColorId(); }
Item { public int getColorId() { return R.color.colorExitRed; } Item(int posX, int posY, int radius); int getX(); int getY(); int getRadius(); boolean collision(PaintView paintView); abstract void activate(final PaintView paintView); abstract String getTextFeedback(); int getColorId();  }