NPlayer ======= The NPlayer Service provides helpers RPCs for ensuring round-robin turn taking among the roles in the project's room. Each role will receive a "start game" message at the start and then "start turn" message when it is the given role's turn to act. .. toctree:: :maxdepth: 2 :titlesonly: :caption: RPC Categories RPCS ---- .. function:: NPlayer.endTurn(next: String?) End your current turn. **Arguments:** - ``next: String?`` (`String `__) - Specify the player to go next .. function:: NPlayer.getActive() Get the player whose turn it currently is. **Returns:** ``String`` (`String `__) - role id of the active player, or empty string if there are no players .. function:: NPlayer.getN() Get the number of detected players in the game. **Returns:** ``Integer`` (`Integer `__) - number of players .. function:: NPlayer.getNext() Get the player who will be active next. **Returns:** ``String`` (`String `__) - role id of the next player, or empty string if there are no players .. function:: NPlayer.getPrevious() Get the player who played last. **Returns:** ``String`` (`String `__) - role id of the previous player, or empty string if no previous player .. function:: NPlayer.start() Start a new turn-based game. **Returns:** ``Boolean`` (`Boolean `__) - ``true`` on successful start