The Taxi Game Map
Methods
# static adjustedToAbsPos(relPosition) → {Vec2}
Adjust the relative position to the absolute position
Parameters:
Name | Type | Description |
---|---|---|
relPosition |
Vec2
|
The relative position |
# static checkIfPositionIsDestination(position) → {boolean}
Check if the provided position is a destination
Parameters:
Name | Type | Description |
---|---|---|
position |
Vec2
|
the position |
Whether it is a destination
boolean
# static getRandomPosition(rng) → {Vec2}
Get a random game position
Parameters:
Name | Type | Description |
---|---|---|
rng |
seedrandom.PRNG
|
The random number generator |
the position
# static logGameState(gameState) → {void}
log the game state
Parameters:
Name | Type | Description |
---|---|---|
gameState |
TaxiGameState
|
the game state |
void
# static resetCustomer(rng, playerPos) → {CustomerStartState}
Reset the customer position
Parameters:
Name | Type | Description |
---|---|---|
rng |
seedrandom.PRNG
|
the random number generator |
playerPos |
Vec2
|
The player position |
The customers starting state