Module

TaxiUtils

Methods

# static adjustedToAbsPos(relPosition) → {Vec2}

Adjust the relative position to the absolute position

Parameters:
Name Type Description
relPosition Vec2

The relative position

View Source core/src/Games/TaxiGame/TaxiUtils.ts, line 15

Vec2

# static checkIfPositionIsDestination(position) → {boolean}

Check if the provided position is a destination

Parameters:
Name Type Description
position Vec2

the position

View Source core/src/Games/TaxiGame/TaxiUtils.ts, line 29

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

View Source core/src/Games/TaxiGame/TaxiUtils.ts, line 62

the position

Vec2

# static logGameState(gameState) → {void}

log the game state

Parameters:
Name Type Description
gameState TaxiGameState

the game state

View Source core/src/Games/TaxiGame/TaxiUtils.ts, line 72

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

View Source core/src/Games/TaxiGame/TaxiUtils.ts, line 43

The customers starting state