test_class.declarator: mockGameContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GameContext mockGameContext;
test_class.type: GameContext
test_class.var_name: mockGameContext
test_class.declarator: mockDimensionProvider
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GamePanelDimensionProvider mockDimensionProvider;
test_class.type: GamePanelDimensionProvider
test_class.var_name: mockDimensionProvider
test_class.file: gazeplay-core/src/test/java/net/gazeplay/commons/utils/BravoTest.java
test_class.identifier: BravoTest
test_case.body: @Test
      public void shouldSetConfettiOnStart() throws TimeoutException {
          ObservableList<Node> mockList = FXCollections.observableArrayList();
  
          when(mockGameContext.getGamePanelDimensionProvider()).thenReturn(mockDimensionProvider);
          when(mockGameContext.getChildren()).thenReturn(mockList);
          when(mockDimensionProvider.getDimension2D()).thenReturn(new Dimension2D(100d, 100d));
  
          FxToolkit.registerPrimaryStage();
          BravoTestApp bravoTestApp = (BravoTestApp) FxToolkit.setupApplication(BravoTestApp.class);
  
          Bravo bravo = bravoTestApp.bravo;
  
          bravo.setConfettiOnStart(mockGameContext);
  
          FxToolkit.cleanupStages();
          assertEquals(101, mockList.size());
      }
test_case.class_method_signature: BravoTest.shouldSetConfettiOnStart()
test_case.full_signature: @Test public void shouldSetConfettiOnStart()
test_case.identifier: shouldSetConfettiOnStart
test_case.invocations: observableArrayList thenReturn when getGamePanelDimensionProvider thenReturn when getChildren thenReturn when getDimension2D registerPrimaryStage setupApplication setConfettiOnStart cleanupStages assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldSetConfettiOnStart()
focal_class.declarator: soundClipDuration = 6000
focal_class.modifier: private static final
focal_class.original_string: private static final int soundClipDuration = 6000;
focal_class.type: int
focal_class.var_name: soundClipDuration
focal_class.declarator: zoomInAndOutCyclesCount = 3
focal_class.modifier: private static final
focal_class.original_string: private static final int zoomInAndOutCyclesCount = 3;
focal_class.type: int
focal_class.var_name: zoomInAndOutCyclesCount
focal_class.declarator: animationDelayDuration = 500
focal_class.modifier: private static final
focal_class.original_string: private static final int animationDelayDuration = 500;
focal_class.type: int
focal_class.var_name: animationDelayDuration
focal_class.declarator: zoomInDuration = (soundClipDuration - animationDelayDuration) / (zoomInAndOutCyclesCount)
focal_class.modifier: private static final
focal_class.original_string: private static final int zoomInDuration = (soundClipDuration - animationDelayDuration) / (zoomInAndOutCyclesCount);
focal_class.type: int
focal_class.var_name: zoomInDuration
focal_class.declarator: fadeInDuration = zoomInDuration / 2
focal_class.modifier: private static final
focal_class.original_string: private static final int fadeInDuration = zoomInDuration / 2;
focal_class.type: int
focal_class.var_name: fadeInDuration
focal_class.declarator: delayBeforeNextRoundDuration = 1000
focal_class.modifier: private static final
focal_class.original_string: private static final int delayBeforeNextRoundDuration = 1000;
focal_class.type: int
focal_class.var_name: delayBeforeNextRoundDuration
focal_class.declarator: pictureInitialHeightToSceneHeightRatio = 1d / 3d
focal_class.modifier: private static final
focal_class.original_string: private static final double pictureInitialHeightToSceneHeightRatio = 1d / 3d;
focal_class.type: double
focal_class.var_name: pictureInitialHeightToSceneHeightRatio
focal_class.declarator: pictureFinalHeightToSceneHeightRatio = 0.95d
focal_class.modifier: private static final
focal_class.original_string: private static final double pictureFinalHeightToSceneHeightRatio = 0.95d;
focal_class.type: double
focal_class.var_name: pictureFinalHeightToSceneHeightRatio
focal_class.declarator: defaultPictureResourceLocation = "data/common/images/bravo.gif"
focal_class.modifier: private static final
focal_class.original_string: private static final String defaultPictureResourceLocation = "data/common/images/bravo.gif";
focal_class.type: String
focal_class.var_name: defaultPictureResourceLocation
focal_class.declarator: defaultSoundResourceLocation = "data/common/sounds/applause.mp3"
focal_class.modifier: private static final
focal_class.original_string: private static final String defaultSoundResourceLocation = "data/common/sounds/applause.mp3";
focal_class.type: String
focal_class.var_name: defaultSoundResourceLocation
focal_class.declarator: pictureResourceLocation
focal_class.modifier: private final
focal_class.original_string: private final String pictureResourceLocation;
focal_class.type: String
focal_class.var_name: pictureResourceLocation
focal_class.declarator: soundResource
focal_class.modifier: private final
focal_class.original_string: private final String soundResource;
focal_class.type: String
focal_class.var_name: soundResource
focal_class.declarator: enableRewardSound
focal_class.modifier: private final
focal_class.original_string: private final boolean enableRewardSound;
focal_class.type: boolean
focal_class.var_name: enableRewardSound
focal_class.declarator: fullTransition
focal_class.modifier: private final
focal_class.original_string: private final SequentialTransition fullTransition;
focal_class.type: SequentialTransition
focal_class.var_name: fullTransition
focal_class.file: gazeplay-core/src/main/java/net/gazeplay/commons/utils/Bravo.java
focal_class.identifier: Bravo
focal_class.class_method_signature: Bravo.Bravo()
focal_class.full_signature: public  Bravo()
focal_class.identifier: Bravo
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Bravo()
focal_class.class_method_signature: Bravo.Bravo(final String pictureResourceLocation, final String soundResourceLocation, final boolean enableRewardSound)
focal_class.full_signature: public  Bravo(final String pictureResourceLocation, final String soundResourceLocation, final boolean enableRewardSound)
focal_class.identifier: Bravo
focal_class.modifiers: public
focal_class.parameters: (final String pictureResourceLocation, final String soundResourceLocation, final boolean enableRewardSound)
focal_class.signature:  Bravo(final String pictureResourceLocation, final String soundResourceLocation, final boolean enableRewardSound)
focal_class.class_method_signature: Bravo.playWinTransition(final Region root, final EventHandler<ActionEvent> onFinishedEventHandler)
focal_class.full_signature: public void playWinTransition(final Region root, final EventHandler<ActionEvent> onFinishedEventHandler)
focal_class.identifier: playWinTransition
focal_class.modifiers: public
focal_class.parameters: (final Region root, final EventHandler<ActionEvent> onFinishedEventHandler)
focal_class.return: void
focal_class.signature: void playWinTransition(final Region root, final EventHandler<ActionEvent> onFinishedEventHandler)
focal_class.class_method_signature: Bravo.playWinTransition(
          final Region root,
          final long initialDelay,
          final EventHandler<ActionEvent> onFinishedEventHandler
      )
focal_class.full_signature: public void playWinTransition(
          final Region root,
          final long initialDelay,
          final EventHandler<ActionEvent> onFinishedEventHandler
      )
focal_class.identifier: playWinTransition
focal_class.modifiers: public
focal_class.parameters: (
          final Region root,
          final long initialDelay,
          final EventHandler<ActionEvent> onFinishedEventHandler
      )
focal_class.return: void
focal_class.signature: void playWinTransition(
          final Region root,
          final long initialDelay,
          final EventHandler<ActionEvent> onFinishedEventHandler
      )
focal_class.class_method_signature: Bravo.setConfettiOnStart(final GameContext gc)
focal_class.full_signature: public void setConfettiOnStart(final GameContext gc)
focal_class.identifier: setConfettiOnStart
focal_class.modifiers: public
focal_class.parameters: (final GameContext gc)
focal_class.return: void
focal_class.signature: void setConfettiOnStart(final GameContext gc)
focal_class.class_method_signature: Bravo.delayedStart(final long initialDelay)
focal_class.full_signature: private void delayedStart(final long initialDelay)
focal_class.identifier: delayedStart
focal_class.modifiers: private
focal_class.parameters: (final long initialDelay)
focal_class.return: void
focal_class.signature: void delayedStart(final long initialDelay)
focal_class.class_method_signature: Bravo.createFullTransition()
focal_class.full_signature: private SequentialTransition createFullTransition()
focal_class.identifier: createFullTransition
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: SequentialTransition
focal_class.signature: SequentialTransition createFullTransition()
focal_class.class_method_signature: Bravo.resetState(final Region root)
focal_class.full_signature: private void resetState(final Region root)
focal_class.identifier: resetState
focal_class.modifiers: private
focal_class.parameters: (final Region root)
focal_class.return: void
focal_class.signature: void resetState(final Region root)
focal_class.class_method_signature: Bravo.createScaleTransition()
focal_class.full_signature: private ScaleTransition createScaleTransition()
focal_class.identifier: createScaleTransition
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: ScaleTransition
focal_class.signature: ScaleTransition createScaleTransition()
focal_class.class_method_signature: Bravo.createFadeInTransition()
focal_class.full_signature: private FadeTransition createFadeInTransition()
focal_class.identifier: createFadeInTransition
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: FadeTransition
focal_class.signature: FadeTransition createFadeInTransition()
focal_class.superclass: extends Rectangle
focal_method.body: public void setConfettiOnStart(final GameContext gc) {
          final Dimension2D dim = gc.getGamePanelDimensionProvider().getDimension2D();
          final RandomColorGenerator randomColorGenerator = RandomColorGenerator.getInstance();
          for (int i = 0; i <= 100; i++) {
              final Rectangle r = new Rectangle(-100, -100, dim.getHeight() / 30, dim.getHeight() / 15);
              r.setFill(randomColorGenerator.randomColor());
              gc.getChildren().add(r);
  
              final Duration duration = Duration.millis(1500 + (Math.random() * 5000));
  
              final TranslateTransition tt = new TranslateTransition(duration, r);
              tt.setInterpolator(Interpolator.LINEAR);
              tt.setFromX(Math.random() * (110 * dim.getWidth() / 100));
              tt.setFromY(0);
              tt.setToY(dim.getHeight());
  
              final RotateTransition rt = new RotateTransition(duration, r);
              rt.setInterpolator(Interpolator.LINEAR);
              rt.setByAngle(-360 + Math.random() * 2 * 720);
  
              final FadeTransition ft = new FadeTransition(duration, r);
              ft.setInterpolator(Interpolator.LINEAR);
              ft.setFromValue(0);
              ft.setToValue(0.8);
  
              final ParallelTransition pt = new ParallelTransition();
  
              pt.getChildren().addAll(tt, rt, ft);
  
              pt.setOnFinished(actionEvent -> gc.getChildren().remove(r));
              pt.play();
          }
      }
focal_method.class_method_signature: Bravo.setConfettiOnStart(final GameContext gc)
focal_method.full_signature: public void setConfettiOnStart(final GameContext gc)
focal_method.identifier: setConfettiOnStart
focal_method.invocations: getDimension2D getGamePanelDimensionProvider getInstance getHeight getHeight setFill randomColor add getChildren millis random setInterpolator setFromX random getWidth setFromY setToY getHeight setInterpolator setByAngle random setInterpolator setFromValue setToValue addAll getChildren setOnFinished remove getChildren play
focal_method.modifiers: public
focal_method.parameters: (final GameContext gc)
focal_method.return: void
focal_method.signature: void setConfettiOnStart(final GameContext gc)