Class: VertexTile

VertexTile

new VertexTile()

The VertexTile class
Source:

Extends

Methods

addEdge(edge, position)

Add an edge to the vertex to connect to another vertex
Parameters:
Name Type Description
edge EdgeTile edge tile to another vertex tile
position int index in the list of edges for the tile
Source:

addOccupier(occupier) → {void}

Add a Token to the Tile
Parameters:
Name Type Description
occupier Token token to be added
Inherited From:
Source:
Returns:
Type
void

clearOccupiers() → {void}

Remove all tokens from the Tile
Inherited From:
Source:
Returns:
Type
void

removeOccupier(occupier) → {void}

Remove a Token from the Tile
Parameters:
Name Type Description
occupier Token token to be remvoed
Inherited From:
Source:
Returns:
Type
void

sendMessage(message) → {void}

Method to broadcast a message out to the other components
Parameters:
Name Type Description
message string Message to send
Inherited From:
Source:
Returns:
Type
void

subscribe(callback) → {void}

Method to subscribe to messages
Parameters:
Name Type Description
callback func A callback method to pass the message to
Inherited From:
Source:
Returns:
Type
void