Constructor
new CypherPokerAnalyzer(game)
Creates a new instance.
Parameters:
Name |
Type |
Description |
game |
CypherPokerGame
|
The game instance with which this instance
is to be associated. Event listeners are added to the CypherPokerGame
instance at this time so the analyzer should usually be instantiated at the
beginning of a new game (hand). |
- Source:
Members
(readonly) active
Properties:
Name |
Type |
Description |
True |
Boolean
|
if the instance is active (tracking game actions),
false if not. |
- Source:
(readonly) allKeychainsCommitted
Properties:
Name |
Type |
Description |
allKeychainsCommitted |
Boolean
|
True when all players associated
with the CypherPokerAnalyzer#game instance have committed an
end-game keychain. |
- Source:
(readonly) analysis
Properties:
Name |
Type |
Description |
analysis |
Object
|
The partial or full analysis of the
completed game.
Properties
Name |
Type |
Default |
Description |
private |
Object
|
|
Name/value pairs with each name matching
a player private ID and value containing an array of their verified private
CypherPokerCard instances. |
public |
Array
|
|
Array of verified public CypherPokerCard
instances. |
complete |
Boolean
|
false
|
Set to true when the hand has been
fully validated as far as possible. |
error |
Error
|
null
|
The analysis error object, if one exists. |
|
- Source:
Properties:
Name |
Type |
Description |
communityCards |
Array
|
An array of CypherPokerCard
instances of the community cards reported by the final decryptors. |
- Source:
(readonly) cypherpoker
Properties:
- Source:
cypherpoker
Properties:
- Source:
(readonly) deals
Properties:
Name |
Type |
Description |
deals |
Object
|
Contains name/value pairs with each name representing
the source (dealing) private ID of the player and the associated value being an
array of objects, each containing a fromPID private ID of the sender
of the data, a type denoting the type of dealing operation ("select" or "decrypt"),
the card values in a cards array, and a private property
indicating whether the deal was for private / hole cards or for public / community ones.
Each entry is stored in order of operation. |
- Source:
(readonly) deck
Properties:
Name |
Type |
Description |
deck |
Array
|
An array of named objects, with each
array element storing an object representing a snapshot of the
deck generation and encryption processes. |
- Source:
(readonly) game
Properties:
Name |
Type |
Default |
Description |
game |
CypherPokerGame
|
null
|
The game instance associated with this
analyzer, as set at instantiation time. |
- Source:
keychainCommitTimeout
Properties:
Name |
Type |
Default |
Description |
keychainCommitTimeout |
Number
|
10000
|
The amount of time, in milliseconds,
to wait at the end of a game for all players' keychains to be comitted before timing out. |
- Source:
(readonly) keychains
Properties:
Name |
Type |
Description |
keychains |
Object
|
Name/value pairs of player keychains with
each name representing a player private ID and associated value being their
keychain. The keychain is copied from the associated CypherPokerAnalayzer#game
instance once a game completes. |
- Source:
(readonly) mappedDeck
Properties:
- Source:
players
Properties:
Name |
Type |
Description |
Indexed |
Array
|
list of {CypherPokerPlayer} instances copied
from the associated CypherPokerAnalyzer#game instance. |
- Source:
(readonly) privateCards
Properties:
Name |
Type |
Default |
Description |
privateCards |
Object
|
{}
|
An object of named arrays, with each
array named using the private ID of the associated player and containing
the CypherPokerCard instances of the decrypted private cards for
that player. |
- Source:
table
Properties:
- Source:
Methods
- Source:
Returns:
The
CypherPokerPlayer instance that
is flagged as a dealer.
null
is returned if no dealer is flagged.
-
Type
-
CypherPokerPlayer
Parameters:
Name |
Type |
Description |
mapping |
String
|
The plaintext or face-up card mapping value to
find. |
- Source:
Returns:
The matching card instance or null
if none exists.
-
Type
-
CypherPokerCard
Parameters:
Name |
Type |
Description |
privateID |
String
|
The private ID of the player to return. |
- Source:
Returns:
The
CypherPokerPlayer for the private ID
associated with this instance.
null
is returned if no matching
player private ID can be found.
-
Type
-
CypherPokerPlayer
getPlayers(includeKeychainsopt, includePasswordsopt) → {Object}
Parameters:
- Source:
Returns:
The condensed players array associated with this instance's
game reference.
-
Type
-
Object
Events
analyzed
The cards captured for an associated game have been fully analyzed. A successful
analysis is usually followed by scoring.
Type:
Properties:
- Source:
analyzing
The cards captured for an associated game are about to be analyzed.
Type:
Properties:
- Source:
scored
The cards captured for an associated game have been scored and ranked (post analysis).
Type:
Properties:
- Source: