start bombs is configurable now

slack
Jordan Orelli 10 years ago
parent 3663e4ec62
commit 8c653b619f

@ -27,7 +27,7 @@ func NewConnection(conn net.Conn) *Connection {
c := &Connection{ c := &Connection{
Conn: conn, Conn: conn,
Reader: bufio.NewReader(conn), Reader: bufio.NewReader(conn),
bombs: 1, bombs: options.startBombs,
} }
c.SetState(SpawnRandomly()) c.SetState(SpawnRandomly())
currentGame.Join(c) currentGame.Join(c)

@ -27,6 +27,7 @@ var options struct {
respawnFrames int64 respawnFrames int64
respawnTime time.Duration respawnTime time.Duration
speckPath string speckPath string
startBombs int
} }
var ( var (
@ -122,4 +123,6 @@ func init() {
flag.IntVar(&options.bombCost, "bomb-cost", 500, "price of a bomb") flag.IntVar(&options.bombCost, "bomb-cost", 500, "price of a bomb")
flag.IntVar(&options.colonyCost, "colony-cost", 2000, "price of a colony") flag.IntVar(&options.colonyCost, "colony-cost", 2000, "price of a colony")
flag.DurationVar(&options.makeColonyTime, "colony-time", 15*time.Second, "time it takes to make a colony") flag.DurationVar(&options.makeColonyTime, "colony-time", 15*time.Second, "time it takes to make a colony")
flag.IntVar(&options.startBombs, "start-bombs", 0, "number of bombs a player has at game start")
} }

Loading…
Cancel
Save