diff --git a/connection.go b/connection.go index 0baa12c..817efdd 100644 --- a/connection.go +++ b/connection.go @@ -27,7 +27,7 @@ func NewConnection(conn net.Conn) *Connection { c := &Connection{ Conn: conn, Reader: bufio.NewReader(conn), - bombs: 1, + bombs: options.startBombs, } c.SetState(SpawnRandomly()) currentGame.Join(c) diff --git a/main.go b/main.go index ef02c9f..8a9c840 100644 --- a/main.go +++ b/main.go @@ -27,6 +27,7 @@ var options struct { respawnFrames int64 respawnTime time.Duration speckPath string + startBombs int } var ( @@ -122,4 +123,6 @@ func init() { flag.IntVar(&options.bombCost, "bomb-cost", 500, "price of a bomb") 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.IntVar(&options.startBombs, "start-bombs", 0, "number of bombs a player has at game start") + }