Class: EdgeTile

EdgeTile

new EdgeTile(start, end)

The EdgeTile class
Parameters:
Name Type Description
start VertexTile Vertex on one side of the edge
end VertexTile Vertex on the other side of the edge
Source:

Extends

Methods

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