public class Manager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static long |
INITIAL_TIME |
(package private) static Manager |
manager |
(package private) Round |
round |
(package private) static java.util.concurrent.ScheduledExecutorService |
worker |
Modifier and Type | Method and Description |
---|---|
static Manager |
getInstance()
Single instance of Manager;
|
Puzzle |
getPuzzle()
Get table of current round
|
java.util.List<Rank> |
getRanking()
List of players in current round sorted by points
|
long |
register(java.lang.String nick,
java.lang.String password)
Register user with nick and password for current round
|
void |
setPoints(java.lang.String nick,
int points)
Set number of points obtained by user in current round
|
long |
timeToNextPlay() |
static final java.util.concurrent.ScheduledExecutorService worker
static final long INITIAL_TIME
static Manager manager
Round round
public static Manager getInstance()
public long timeToNextPlay()
public long register(java.lang.String nick, java.lang.String password) throws WWWordzException
nick
- of user to registerpassword
- of user to registerWWWordzException
- if user is invalidpublic Puzzle getPuzzle() throws WWWordzException
WWWordzException
- if game has not startedpublic void setPoints(java.lang.String nick, int points) throws WWWordzException
nick
- of userpoints
- to setWWWordzException
- if game is not over or reporting has endedpublic java.util.List<Rank> getRanking() throws WWWordzException
WWWordzException
- if players can still report values