broadfield-dev commited on
Commit
8209260
·
verified ·
1 Parent(s): 6caeb35

Update static/scripts.js

Browse files
Files changed (1) hide show
  1. static/scripts.js +14 -1
static/scripts.js CHANGED
@@ -1,4 +1,17 @@
1
- const socket = io('http://0.0.0.0:7860'); // Explicitly specify your local server
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  const canvas = document.getElementById('gameCanvas');
3
  const ctx = canvas.getContext('2d');
4
  const tileSize = 32;
 
1
+ const socket = io('https://broadfield-dev-dungeon-game.hf.space');
2
+
3
+ socket.on('connect', () => {
4
+ console.log('Connected to the server!');
5
+ });
6
+
7
+ socket.on('connect_error', (error) => {
8
+ console.error('Connection error:', error);
9
+ });
10
+
11
+ socket.on('disconnect', () => {
12
+ console.log('Disconnected from the server.');
13
+ });
14
+
15
  const canvas = document.getElementById('gameCanvas');
16
  const ctx = canvas.getContext('2d');
17
  const tileSize = 32;