mooball
    Preparing search index...

    Class Goal

    A class that defines a goal.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    d0: number

    The first disc id of this Goal. -1 = empty. Either (p0, p1) or (d0, d1) pairs must be set in a goal object.

    d1: number

    The second disc id of this Goal. -1 = empty. Either (p0, p1) or (d0, d1) pairs must be set in a goal object.

    p0: Point

    The first point of this Goal. null = empty. Either (p0, p1) or (d0, d1) pairs must be set in a goal object.

    p1: Point

    The second point of this Goal. null = empty. Either (p0, p1) or (d0, d1) pairs must be set in a goal object.

    team: Team

    The team that this Goal belongs to.

    Methods

    • Checks whether the line segment that passes through p1 and p2 intersects with the goal line.

      Parameters

      Returns boolean