commit c48ed3bf523c9e610f38598d50012f62252660ba parent 9ca6e94ce31788508dc48065d0392e52e5e3d983 Author: lukeeeeeee334 <lukeosullivan123@gmail.com> Date: Thu, 5 Dec 2024 11:46:44 +0000 more comments Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/TicTacToeClient/src/main/java/com/groupproject/tictactoeclient/ContentPanes/TicTacToeGrid.java b/TicTacToeClient/src/main/java/com/groupproject/tictactoeclient/ContentPanes/TicTacToeGrid.java @@ -65,9 +65,9 @@ public class TicTacToeGrid extends JPanel { public void refresh() { System.out.println("UID: " + client.UID + ", HOST_UID: " + client.HOST_UID + ", GAME_ID: " + client.GID + ", MOVES: " + client.NUM_OF_MOVES + ", ISHOST: " + helperMethods.IsHost()); - + //go through the grid and clear the buttons for (var button : gridButtons) { - button.setText(""); + button.setText(""); //set grid to empty button.setEnabled(true); } diff --git a/TicTacToeClient/src/main/java/com/groupproject/tictactoeclient/ContentPanes/register.java b/TicTacToeClient/src/main/java/com/groupproject/tictactoeclient/ContentPanes/register.java @@ -136,7 +136,7 @@ public class register extends CustomPanel { JOptionPane.showMessageDialog(client.frame, "Please fill in all fields"); return; } - // stores + // stores the UID in responce and stores it as a global variable String response = client.proxy.register(usernameTextField.getText(), passwordTextField.getText(), nameTextField.getText(), surnameTextField.getText()); System.out.println(response); @@ -147,7 +147,7 @@ public class register extends CustomPanel { } else { client.UID = response; - client.username = usernameTextField.getText(); + client.username = usernameTextField.getText();// stores the username as a global System.out.println("Client.UID = " + client.UID); client.showPanel(new MainContentPanel(client)); }