From f2a33fbac8e8ea6e2973c9ad76ed042bf2a778ca Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Sun, 16 Nov 2014 12:30:51 -0500 Subject: [PATCH] players now start with 1000 duckets --- connection.go | 1 + main.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/connection.go b/connection.go index 817efdd..d020288 100644 --- a/connection.go +++ b/connection.go @@ -28,6 +28,7 @@ func NewConnection(conn net.Conn) *Connection { Conn: conn, Reader: bufio.NewReader(conn), bombs: options.startBombs, + money: options.startMoney, } c.SetState(SpawnRandomly()) currentGame.Join(c) diff --git a/main.go b/main.go index 8a9c840..058875b 100644 --- a/main.go +++ b/main.go @@ -28,6 +28,7 @@ var options struct { respawnTime time.Duration speckPath string startBombs int + startMoney int } var ( @@ -124,5 +125,5 @@ func init() { 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") - + flag.IntVar(&options.startMoney, "start-money", 1000, "amount of money a player has to start") }