Browse Source

Renamed package/directory

Stephen McQuay 5 years ago
parent
commit
72d0843ff8
16 changed files with 27 additions and 27 deletions
  1. 9
    9
      botserv/main.go
  2. 1
    1
      config.go
  3. 3
    3
      control.go
  4. 1
    1
      deathmatch.go
  5. 2
    2
      doc.go
  6. 1
    1
      game.go
  7. 1
    1
      id.go
  8. 1
    1
      id_test.go
  9. 1
    1
      melee.go
  10. 1
    1
      obstacle.go
  11. 1
    1
      player.go
  12. 1
    1
      projectile.go
  13. 1
    1
      protocol.go
  14. 1
    1
      robot.go
  15. 1
    1
      robot_test.go
  16. 1
    1
      splosion.go

+ 9
- 9
botserv/main.go View File

@@ -10,7 +10,7 @@ import (
10 10
 	"runtime/pprof"
11 11
 	"time"
12 12
 
13
-	"bitbucket.org/hackerbots/botserv"
13
+	hbserver "bitbucket.org/hackerbots/server"
14 14
 	"code.google.com/p/go.net/websocket"
15 15
 )
16 16
 
@@ -42,23 +42,23 @@ func main() {
42 42
 		log.Println("serving profile info at http://localhost:8667/debug/pprof/")
43 43
 	}
44 44
 
45
-	conf, err := botserv.LoadConfig(*config)
45
+	conf, err := hbserver.LoadConfig(*config)
46 46
 	if err != nil {
47 47
 		log.Fatal(err)
48 48
 	}
49 49
 
50 50
 	sm := http.NewServeMux()
51 51
 
52
-	c := botserv.NewController(conf, *mprofile, *profile)
52
+	c := hbserver.NewController(conf, *mprofile, *profile)
53 53
 	go c.Run()
54 54
 
55
-	sm.Handle("/", botserv.JsonHandler(c.Index))
55
+	sm.Handle("/", hbserver.JsonHandler(c.Index))
56 56
 	sm.Handle("/ws/", websocket.Handler(c.AddPlayer))
57
-	sm.Handle("/game/start/", botserv.JsonHandler(c.StartGame))
58
-	sm.Handle("/game/list/", botserv.JsonHandler(c.ListGames))
59
-	sm.Handle("/game/stats/", botserv.JsonHandler(c.GameStats))
60
-	sm.Handle("/game/bw/", botserv.JsonHandler(c.BW))
61
-	sm.Handle("/game/stop/", botserv.JsonHandler(c.StopGame))
57
+	sm.Handle("/game/start/", hbserver.JsonHandler(c.StartGame))
58
+	sm.Handle("/game/list/", hbserver.JsonHandler(c.ListGames))
59
+	sm.Handle("/game/stats/", hbserver.JsonHandler(c.GameStats))
60
+	sm.Handle("/game/bw/", hbserver.JsonHandler(c.BW))
61
+	sm.Handle("/game/stop/", hbserver.JsonHandler(c.StopGame))
62 62
 	sm.HandleFunc("/fuck/shit/up/", c.KillServer)
63 63
 
64 64
 	err = http.ListenAndServe(*addr, sm)

+ 1
- 1
config.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"encoding/json"

+ 3
- 3
control.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"encoding/json"
@@ -24,7 +24,7 @@ func (h JsonHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
24 24
 }
25 25
 
26 26
 // Controller is the shepherd of a collection of games. The main package in
27
-// botserv simply populates one of these and starts an http server.
27
+// server simply populates one of these and starts an http server.
28 28
 type Controller struct {
29 29
 	Idg        *IdGenerator
30 30
 	Conf       Config
@@ -247,7 +247,7 @@ func (c *Controller) StopGame(w http.ResponseWriter, req *http.Request) {
247 247
 	log.Printf("returning from StopGame")
248 248
 }
249 249
 
250
-// KillServer is my favorite method of all the methods in botserv: it shuts
250
+// KillServer is my favorite method of all the methods in server: it shuts
251 251
 // things down respecting profiling requests.
252 252
 func (c *Controller) KillServer(w http.ResponseWriter, req *http.Request) {
253 253
 	if c.Profile != "" {

+ 1
- 1
deathmatch.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"log"

+ 2
- 2
doc.go View File

@@ -1,3 +1,3 @@
1
-// botserv is the collection of structs and functions used to implement
1
+// server is the collection of structs and functions used to implement
2 2
 // a hackerbots server
3
-package botserv
3
+package server

+ 1
- 1
game.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 // delete me
4 4
 

+ 1
- 1
id.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"crypto/md5"

+ 1
- 1
id_test.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"testing"

+ 1
- 1
melee.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"log"

+ 1
- 1
obstacle.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"math"

+ 1
- 1
player.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"encoding/gob"

+ 1
- 1
projectile.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"log"

+ 1
- 1
protocol.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"log"

+ 1
- 1
robot.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"log"

+ 1
- 1
robot_test.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	"log"

+ 1
- 1
splosion.go View File

@@ -1,4 +1,4 @@
1
-package botserv
1
+package server
2 2
 
3 3
 import (
4 4
 	v "bitbucket.org/hackerbots/vector"

Loading…
Cancel
Save