Home Manual Reference Source Test Repository

Test

Description Identifier Count

returns the number of users

Channel#getNumberOfUsers

returns the user ID

Channel#getUserID

returns the other users’ IDs

Channel#getOtherUserIDs

sends the message over the DataChannel

Channel#send

sends the message over the DataChannel to the right user

Channel#sendPrivately

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

sets the onMessageCallback

Connection#dataChannel.openSignalingChannel

returns send and dataChannel

Connection#dataChannel.openSignalingChannel

returns a factory instance

Connection#open

returns a factory instance

Connection#connect

sets the Deck ID

Deck#constructor

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

throws a NoErrorListenerError if no error listener

Deck#drawCard

asks other players for card keys

Deck#drawCard

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

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

emits event if all player secrets are known

Deck#checkAllCardSecrets

throws a NoErrorListenerError if no error listener

Die#roll

sends rollstart message and registers events

Die#roll

registers publicKnownFace event

Die#handleMessage

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()

throws ConnectionNotStartedError if not connected

Game#getURL

returns the current URL if connected

Game#getURL

rejects with ConnectionNotStartedError if not connected

Game#getNumberOfPlayers

returns the number of players if connected

Game#getNumberOfPlayers

registers the needed events

Game#registerEvents

throws ConnectionNotStartedError if not connected

Game#start

fires start event

Game#start

sends start message and player numbers to other players

Game#start

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

should return a deck with the given cards

Game#createDeck

should shuffle deck on game start or if already started

Game#createDeck

sends message and emits move event

Piece#move

emits move event

Piece#handleMessage