documentation for all major modules

This commit is contained in:
Clément
2025-03-12 23:16:39 +01:00
parent 0b6f5193a0
commit dfdaae163b
4 changed files with 94 additions and 13 deletions

View File

@@ -1,5 +1,8 @@
package client;
/**
* This class aims to make the username available to all controllers. (Recommended by JavaFX, because otherwise, FXMLLoader bugs and doesn't switch scenes properly.)
*/
public class UsernameSingleton {
private static UsernameSingleton instance;
private String username;
@@ -7,6 +10,10 @@ public class UsernameSingleton {
private UsernameSingleton() {
}
/**
* Get the instance of the singleton.
* @return the instance
*/
public static UsernameSingleton getInstance() {
if (instance == null) {
instance = new UsernameSingleton();