Browse Source

Added space invaders nes

Robin de Jong 2 years ago
parent
commit
9f52617972
4 changed files with 4 additions and 4 deletions
  1. BIN
      rom/invader.nes
  2. 1 1
      run
  3. 1 1
      server/server.go
  4. 2 2
      web/js/Main.js

BIN
rom/invader.nes


+ 1 - 1
run

@@ -1,3 +1,3 @@
 #!/bin/bash
-go run main.go "rom/mario.nes" | ledcat --geometry 150x16 show
+go run main.go "rom/invader.nes" | ledcat --geometry 150x16 show
 #go run main.go | ledcat --geometry 256x240 show

+ 1 - 1
server/server.go

@@ -39,6 +39,6 @@ func (s *Server) Run() {
 	})
 
 	http.Handle("/socket.io/", s.io)
-	http.Handle("/", http.FileServer(http.Dir("./web")))
+	//http.Handle("/", http.FileServer(http.Dir("./web")))
 	log.Panic(http.ListenAndServe(":9998", nil))
 }

+ 2 - 2
web/js/Main.js

@@ -15,8 +15,8 @@ var SPACE_KEY = 32;
 
 
 $(function() {
-    var socket = io("http://127.0.0.1:9998");
-    // var socket = io("http://100.64.0.72:9998");
+    // var socket = io("http://127.0.0.1:9998");
+    var socket = io("http://100.64.0.72:9998");
     console.log("Connecting to: http://127.0.0.1:9998");
     socket.on('connect_failed', function() {
        console.log("Failed: ", arguments);