players now start with 1000 duckets

slack
Jordan Orelli 10 years ago
parent 8c653b619f
commit f2a33fbac8

@ -28,6 +28,7 @@ func NewConnection(conn net.Conn) *Connection {
Conn: conn, Conn: conn,
Reader: bufio.NewReader(conn), Reader: bufio.NewReader(conn),
bombs: options.startBombs, bombs: options.startBombs,
money: options.startMoney,
} }
c.SetState(SpawnRandomly()) c.SetState(SpawnRandomly())
currentGame.Join(c) currentGame.Join(c)

@ -28,6 +28,7 @@ var options struct {
respawnTime time.Duration respawnTime time.Duration
speckPath string speckPath string
startBombs int startBombs int
startMoney int
} }
var ( var (
@ -124,5 +125,5 @@ func init() {
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") 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")
} }

Loading…
Cancel
Save