Package controller
Interface IUserController
- All Known Implementing Classes:
UserController
public interface IUserController
Handles communication between Model's User-class and the GUI
-
Method Summary
Modifier and TypeMethodDescriptionreturns the username of the logged-in userbooleanreturns true if the user is logged inbooleanreturns the score for the next wrong guessvoidlogout()logs out the user if logged inbooleanregisters a new user
-
Method Details
-
login
returns the score for the next wrong guess- Parameters:
username- the username of the userpassword- the password of the user- Returns:
- true if the user was successfully logged in
-
register
registers a new user- Parameters:
username- the username of the new userpassword- the password of the new user- Returns:
- true if the user was successfully registered
-
logout
void logout()logs out the user if logged in -
isLoggedIn
boolean isLoggedIn()returns true if the user is logged in- Returns:
- true if the user is logged in
-
getUsername
String getUsername()returns the username of the logged-in user- Returns:
- the username of the logged-in user
-