new Robot(team, alliance, startingPosition)
Parameters:
Name | Type | Description |
---|---|---|
team |
string | The team number of the robot |
alliance |
Alliance | The alliance that the robot is on |
startingPosition |
number | The starting position of the robot |
Properties:
Name | Type | Description |
---|---|---|
inventory |
number | The game piece that the robot has in its inventory |
startingElement |
number | The game piece that the robot starts with |
startingPosition |
number | The starting position of the robot |
- Source:
Methods
(static) getInventory(events) → {number}
Gets the inventory of the robot
Parameters:
Name | Type | Description |
---|---|---|
events |
Array | The events to use to calculate the inventory |
- Source:
Returns:
The inventory of the robot
- Type
- number
(static) mobilityBonus()
Gives the robot a mobility bonus
- Source:
(static) pickUp(gamePiece, location)
Picks up a game piece from the field
Parameters:
Name | Type | Description |
---|---|---|
gamePiece |
number | The game piece to pick up |
location |
number | The location of the game piece |
- Source:
(static) reset()
Resets the robot to its starting state
- Source:
(static) scorePiece(location)
Scores a game piece on the field
Parameters:
Name | Type | Description |
---|---|---|
location |
number | The location to score the game piece |
- Source:
(static) setInventory(gamePiece)
Sets the inventory of the robot
Parameters:
Name | Type | Description |
---|---|---|
gamePiece |
number | The game piece to set the inventory to |
- Source: