Channel
|
Channel |
5 |
#getNumberOfUsers()
|
- |
1 |
returns the number of users
|
Channel#getNumberOfUsers |
|
#getUserID()
|
- |
1 |
returns the user ID
|
Channel#getUserID |
|
#getOtherUserIDs()
|
- |
1 |
returns the other users’ IDs
|
Channel#getOtherUserIDs |
|
#send()
|
- |
1 |
sends the message over the DataChannel
|
Channel#send |
|
#sendPrivately()
|
- |
1 |
sends the message over the DataChannel to the right user
|
Channel#sendPrivately |
|
Connection
|
Connection |
9 |
#handleSignalingData()
|
- |
5 |
calls the right handler
|
Connection#handleSignalingData |
|
calls with the message
|
Connection#handleSignalingData |
|
does not call with wrong dataChannel
|
Connection#handleSignalingData |
|
does not call with message from own user id
|
Connection#handleSignalingData |
|
calls only once for each message id
|
Connection#handleSignalingData |
|
#dataChannel.openSignalingChannel()
|
- |
2 |
sets the onMessageCallback
|
Connection#dataChannel.openSignalingChannel |
|
returns send and dataChannel
|
Connection#dataChannel.openSignalingChannel |
|
#open()
|
- |
1 |
returns a factory instance
|
Connection#open |
|
#connect()
|
- |
1 |
returns a factory instance
|
Connection#connect |
|
Deck
|
Deck |
24 |
#constructor()
|
- |
1 |
sets the Deck ID
|
Deck#constructor |
|
#shuffle()
|
- |
4 |
throws a NoErrorListenerError if no error listener
|
Deck#shuffle |
|
creates the own mental poker player
|
Deck#shuffle |
|
creates the own mental poker player
|
Deck#shuffle |
|
sends player details to other players
|
Deck#shuffle |
|
#drawCard()
|
- |
2 |
throws a NoErrorListenerError if no error listener
|
Deck#drawCard |
|
asks other players for card keys
|
Deck#drawCard |
|
#handleMessage()
|
- |
11 |
sets the player details on playerdetails message
|
Deck#handleMessage |
|
adds, shuffles, and sends to next player on shuffled message if next player
|
Deck#handleMessage |
|
add, do not shuffle or send on shuffled message if not next player
|
Deck#handleMessage |
|
shuffles and sends to first player on shuffled message if last player
|
Deck#handleMessage |
|
add, lock deck, and send to player 1 on shuffled message if player 0
|
Deck#handleMessage |
|
add, lock deck, and send to next player on locked message if next player
|
Deck#handleMessage |
|
add, do not lock or send deck on locked message if not next player
|
Deck#handleMessage |
|
add, lock, and send and emit shuffleFinish on locked message if next player
|
Deck#handleMessage |
|
emits shuffleFinish event on locked message if there is no next player
|
Deck#handleMessage |
|
sends player the card secret on draw message
|
Deck#handleMessage |
|
adds the secret to the right player on cardsecret message
|
Deck#handleMessage |
|
#checkAllPlayerDetails()
|
- |
5 |
does not set the CypherPokerGame if not received all player details
|
Deck#checkAllPlayerDetails |
|
does set the CypherPokerGame if received all player details
|
Deck#checkAllPlayerDetails |
|
does not generate deck if not player 0
|
Deck#checkAllPlayerDetails |
|
generates and shuffles deck if received all and player number is 0
|
Deck#checkAllPlayerDetails |
|
sends the game to player 1 if received all and player number is 0
|
Deck#checkAllPlayerDetails |
|
#checkAllCardSecrets()
|
- |
1 |
emits event if all player secrets are known
|
Deck#checkAllCardSecrets |
|
Die
|
Die |
3 |
#roll()
|
- |
2 |
throws a NoErrorListenerError if no error listener
|
Die#roll |
|
sends rollstart message and registers events
|
Die#roll |
|
#handleMessage()
|
- |
1 |
registers publicKnownFace event
|
Die#handleMessage |
|
Game
|
Game |
21 |
#startConnection()
|
- |
5 |
opens a new connection if no URL hash is set
|
Game#startConnection() |
|
sets the URL hash when new connection is opened
|
Game#startConnection() |
|
sets the player number to 0 if new connection is opened
|
Game#startConnection() |
|
connects if a URL hash is set
|
Game#startConnection() |
|
doesn’t set the player number to 0 if connected to other host
|
Game#startConnection() |
|
#getURL()
|
- |
2 |
throws ConnectionNotStartedError if not connected
|
Game#getURL |
|
returns the current URL if connected
|
Game#getURL |
|
#getNumberOfPlayers()
|
- |
2 |
rejects with ConnectionNotStartedError if not connected
|
Game#getNumberOfPlayers |
|
returns the number of players if connected
|
Game#getNumberOfPlayers |
|
#registerEvents()
|
- |
1 |
registers the needed events
|
Game#registerEvents |
|
#start()
|
- |
3 |
throws ConnectionNotStartedError if not connected
|
Game#start |
|
fires start event
|
Game#start |
|
sends start message and player numbers to other players
|
Game#start |
|
#handleMessage()
|
- |
6 |
should set user IDs on start message
|
Game#handleMessage |
|
should set player number on start message
|
Game#handleMessage |
|
should fire start event on start message
|
Game#handleMessage |
|
should redirect to the corresponding deck on deck message
|
Game#handleMessage |
|
should redirect to the corresponding die on die message
|
Game#handleMessage |
|
should redirect to the corresponding piece on piece message
|
Game#handleMessage |
|
#createDeck()
|
- |
2 |
should return a deck with the given cards
|
Game#createDeck |
|
should shuffle deck on game start or if already started
|
Game#createDeck |
|
Piece
|
Piece |
2 |
#move()
|
- |
1 |
sends message and emits move event
|
Piece#move |
|
#handleMessage()
|
- |
1 |
emits move event
|
Piece#handleMessage |
|