TwentyQuestions

The TwentyQuestions Service aids in the creation of a multiplayer game of twenty questions.

RPCS

TwentyQuestions.answer(answer: String)

Answer a yes or no question about the secret word or phrase.

Arguments:

  • answer: String (String) - yes or no response to previous question

TwentyQuestions.gameStarted()

Check if the game has been started.

Returns: Boolean (Boolean) - true if the game has started

TwentyQuestions.guess(guess: String)

Guess the word or phrase.

Arguments:

  • guess: String (String) - word or phrase to guess

Returns: Boolean (Boolean) - true if the guess was correct, otherwise false

TwentyQuestions.restart()

Restart the game.

TwentyQuestions.start(answer: String)

Start a new game of twenty questions.

Arguments:

  • answer: String (String) - The word or phrase to guess

Returns: Boolean (Boolean) - true on successful start