got simple testing server working

This commit is contained in:
sm
2013-08-25 23:10:02 -07:00
parent ccd5dc3961
commit 880d73b54e
3 changed files with 40 additions and 11 deletions
+14
View File
@@ -19,6 +19,20 @@ type game struct {
sunregister chan *Spectator
}
func NewGame() *game {
return &game{
register: make(chan *player),
unregister: make(chan *player),
projectiles: make(map[*projectile]bool),
splosions: make(map[*splosion]bool),
players: make(map[*player]bool),
turn: 0,
spectators: make(map[*Spectator]bool),
sregister: make(chan *Spectator),
sunregister: make(chan *Spectator),
}
}
type Config struct {
ID string `json:"id"`
Stats stats `json:"stats"`