@Test public void testThatOnFingerDraggedExploresLineForCoordinatesInRainbowInputController() { givenThatHasPreviousFingerMovements(); gameOfLife.onFingerDragged(motionEvent); verify(rainbowDrawer).exploreLine(rainbowInputController.getPreviousX(), rainbowInputController.getPreviousY(), rainbowInputController.getX(), rainbowInputController.getY(), RainbowDrawer.Precision.HIGH, gameOfLife); }
@Override public void onFingerDragged(MotionEvent motionEvent) { int x = (int) rainbowInputController.getX(); int y = (int) rainbowInputController.getY(); int previousX = (int) rainbowInputController.getPreviousX(); int previousY = (int) rainbowInputController.getPreviousY(); rainbowInputController.getRainbowDrawer().exploreLine(previousX, previousY, x, y, RainbowDrawer.Precision.HIGH, this); }
GameOfLife implements RainbowInputController.RainbowInteractionListener, OnCellUpdatedCallback2D, RainbowDrawer.PointDetectedListener { @Override public void onFingerDragged(MotionEvent motionEvent) { int x = (int) rainbowInputController.getX(); int y = (int) rainbowInputController.getY(); int previousX = (int) rainbowInputController.getPreviousX(); int previousY = (int) rainbowInputController.getPreviousY(); rainbowInputController.getRainbowDrawer().exploreLine(previousX, previousY, x, y, RainbowDrawer.Precision.HIGH, this); } }
GameOfLife implements RainbowInputController.RainbowInteractionListener, OnCellUpdatedCallback2D, RainbowDrawer.PointDetectedListener { @Override public void onFingerDragged(MotionEvent motionEvent) { int x = (int) rainbowInputController.getX(); int y = (int) rainbowInputController.getY(); int previousX = (int) rainbowInputController.getPreviousX(); int previousY = (int) rainbowInputController.getPreviousY(); rainbowInputController.getRainbowDrawer().exploreLine(previousX, previousY, x, y, RainbowDrawer.Precision.HIGH, this); } @VisibleForTesting  GameOfLife(AutomataDiscrete2D gameOfLifeAutomata, GameOfLifeDrawer gameOfLifeDrawer, RainbowInputController rainbowInputController); }
GameOfLife implements RainbowInputController.RainbowInteractionListener, OnCellUpdatedCallback2D, RainbowDrawer.PointDetectedListener { @Override public void onFingerDragged(MotionEvent motionEvent) { int x = (int) rainbowInputController.getX(); int y = (int) rainbowInputController.getY(); int previousX = (int) rainbowInputController.getPreviousX(); int previousY = (int) rainbowInputController.getPreviousY(); rainbowInputController.getRainbowDrawer().exploreLine(previousX, previousY, x, y, RainbowDrawer.Precision.HIGH, this); } @VisibleForTesting  GameOfLife(AutomataDiscrete2D gameOfLifeAutomata, GameOfLifeDrawer gameOfLifeDrawer, RainbowInputController rainbowInputController); static GameOfLife newInstance(RainbowDrawer rainbowDrawer,
                                         RainbowInputController rainbowInputController); void doStep(); @Override void onCellDetected(int x, int y, int state); @Override void onSketchTouched(MotionEvent motionEvent); @Override void onSketchReleased(MotionEvent motionEvent); @Override void onFingerDragged(MotionEvent motionEvent); @Override void onPointDetected(float px, float py, float x, float y); @Override void onMotionEvent(MotionEvent motionEvent); void startEdition(); void endEdition(); void clear(); void restoreLastWorld(); void loadWorldFrom(RainbowImage image); }
GameOfLife implements RainbowInputController.RainbowInteractionListener, OnCellUpdatedCallback2D, RainbowDrawer.PointDetectedListener { @Override public void onFingerDragged(MotionEvent motionEvent) { int x = (int) rainbowInputController.getX(); int y = (int) rainbowInputController.getY(); int previousX = (int) rainbowInputController.getPreviousX(); int previousY = (int) rainbowInputController.getPreviousY(); rainbowInputController.getRainbowDrawer().exploreLine(previousX, previousY, x, y, RainbowDrawer.Precision.HIGH, this); } @VisibleForTesting  GameOfLife(AutomataDiscrete2D gameOfLifeAutomata, GameOfLifeDrawer gameOfLifeDrawer, RainbowInputController rainbowInputController); static GameOfLife newInstance(RainbowDrawer rainbowDrawer,
                                         RainbowInputController rainbowInputController); void doStep(); @Override void onCellDetected(int x, int y, int state); @Override void onSketchTouched(MotionEvent motionEvent); @Override void onSketchReleased(MotionEvent motionEvent); @Override void onFingerDragged(MotionEvent motionEvent); @Override void onPointDetected(float px, float py, float x, float y); @Override void onMotionEvent(MotionEvent motionEvent); void startEdition(); void endEdition(); void clear(); void restoreLastWorld(); void loadWorldFrom(RainbowImage image);  }