Refactored everything into modules.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user