Refactored everything into modules.

This commit is contained in:
2025-04-01 23:38:35 +00:00
parent 53f9eb9265
commit 2f7cda4b6d
8 changed files with 107 additions and 105 deletions
+1 -4
View File
@@ -2,7 +2,7 @@
* Socket Client Module
* Manages WebSocket communication with the game server.
*/
class SocketClient {
export class SocketClient {
constructor(serverUrl) {
this.socket = null;
this.serverUrl = serverUrl || window.location.origin; // Default to current origin
@@ -174,6 +174,3 @@ class SocketClient {
this.emit('loadGame');
}
}
// Export the class if using modules
// export default SocketClient;