Class ReefscapeReefSimulation

java.lang.Object
org.ironmaple.simulation.seasonspecific.reefscape2025.ReefscapeReefSimulation
All Implemented Interfaces:
SimulatedArena.Simulatable

public class ReefscapeReefSimulation extends Object implements SimulatedArena.Simulatable

Simulates a REEFs on the field.

This class simulates a REEFs on the field where CORALs can be scored. This class does not directly handle scoring uses an array of ReefscapeReefBranch objects. However for all other purposes this class behaves and can be used like a normal goal.

  • Field Details

  • Method Details

    • draw

      public void draw(List<Pose3d> coralPosesToDisplay)
    • simulationSubTick

      public void simulationSubTick(int subTickNum)
      Description copied from interface: SimulatedArena.Simulatable
      Specified by:
      simulationSubTick in interface SimulatedArena.Simulatable
      Parameters:
      subTickNum - the number of this sub-tick (counting from 0 in each robot period)
    • clearReef

      public void clearReef()

      Resets the reef to its original state.

    • getBranches

      public int[][] getBranches()
      Obtains the amount of CORAL held on the BRANCHES.

      This method returns a 2D array of size 12 x 4, where each entry represents the number of CORALs held on a particular branch.

      The BRANCHES are tracked in FMS as A, B, C, D, E, F, G, H, I, J, K, L (as per the game manual), and are mapped to indices 0, 1, 2, ... in the array.

      The [i][j] entry in the array represents the number of CORAL(s) held on the Lj-1 branch in the ith section.

      For example, getBranches()[2][3] returns the number of CORALs held on L4 of Branch C.

      Note that L2, L3, and L4 can only hold one CORAL, while L1 can hold up to two CORALs.

      Returns:
      a 2D array where each entry represents the number of CORAL held on each branch