Class Alliance

java.lang.Object
org.team1126.lib.util.Alliance

public final class Alliance extends Object
Shorthand for getting the robot's alliance. Defaults to the blue alliance if the current alliance is unknown.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Returns true if the robot is on the blue alliance, and false if the robot is on the red alliance.
    static boolean
    Returns true if the robot is on the red alliance, and false if the robot is on the blue alliance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isBlue

      public static boolean isBlue()
      Returns true if the robot is on the blue alliance, and false if the robot is on the red alliance. If the robot's alliance is unknown, defaults to true (blue).
    • isRed

      public static boolean isRed()
      Returns true if the robot is on the red alliance, and false if the robot is on the blue alliance. If the robot's alliance is unknown, defaults to false (blue).