Methods
(async) _getObjectFromPredicateForResource(url:, predicate:) → {Promise}
This method returns the object of resource via a predicate.
Parameters:
Name | Type | Description |
---|---|---|
url: |
the url of the resource. | |
predicate: |
the predicate for which to look. |
Returns:
- Type:
-
Promise
: a promise that resolves with the object or null if none is found.
(async) findWebIdOfOpponent(gameUrl:, userWebId:) → {Promise}
This method returns the WebId of the opponent.
Parameters:
Name | Type | Description |
---|---|---|
gameUrl: |
the url of the game | |
userWebId: |
the WebId of the user |
Returns:
- Type:
-
Promise
: a promise that resolves with the WebId of the opponent or null if not found
(async) loadFromUrl(gameUrl:, userWebId:, moveBaseUrl:) → {SemanticChess}
This method creates a instance of Semantic Chess, based on a URL that describes the game.
Parameters:
Name | Type | Description |
---|---|---|
gameUrl: |
string
|
the url that represents the game |
userWebId: |
string
|
the WebId of the user |
moveBaseUrl: |
string
|
function
|
base url used to create urls for new moves |