public class ScoreManagement
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static GameResult[] |
games |
static User[] |
users |
Constructor and Description |
---|
ScoreManagement() |
Modifier and Type | Method and Description |
---|---|
static void |
addGame(GameResult game) |
static void |
addUser(java.lang.String user)
Add a new user to the database
|
static User[] |
getComputerUsers() |
static GameResult[] |
getGamesDay() |
static GameResult[] |
getGamesWeek() |
static User[] |
getHumanUsers() |
static User |
getUserByDiff(int diff)
Gets an User instance for the computer player with the specified difficulty level
|
static User |
getUserByID(int ident)
Gets an User instance for the given ID, or null if no such user exists
|
static void |
Init() |
public static User[] users
public static GameResult[] games
public static void Init()
public static void addGame(GameResult game)
public static GameResult[] getGamesDay()
public static GameResult[] getGamesWeek()
public static User[] getHumanUsers()
public static User[] getComputerUsers()
public static void addUser(java.lang.String user)
user
- Name of the new userpublic static User getUserByID(int ident)
ident
- The ID number of the userpublic static User getUserByDiff(int diff)
diff
- Difficulty level to look for