removed StatsReq from client struct
This commit is contained in:
parent
c21e0c5582
commit
6c67d83f49
@ -25,7 +25,6 @@ type Client struct {
|
|||||||
GameId string
|
GameId string
|
||||||
Name string
|
Name string
|
||||||
Server string
|
Server string
|
||||||
StatsReq server.StatsRequest
|
|
||||||
Game server.GameParam
|
Game server.GameParam
|
||||||
|
|
||||||
boardstate *server.Boardstate
|
boardstate *server.Boardstate
|
||||||
|
@ -43,27 +43,27 @@ func main() {
|
|||||||
Name: *botname,
|
Name: *botname,
|
||||||
GameId: gameId,
|
GameId: gameId,
|
||||||
// XXX: update with missing fields
|
// XXX: update with missing fields
|
||||||
StatsReq: server.StatsRequest{
|
|
||||||
Hp: *hp,
|
|
||||||
Speed: *speed,
|
|
||||||
Acceleration: *acceleration,
|
|
||||||
ScannerRadius: *scannerRadius,
|
|
||||||
TurnSpeed: *turnSpeed,
|
|
||||||
FireRate: *fireRate,
|
|
||||||
WeaponRadius: *weaponRadius,
|
|
||||||
WeaponDamage: *weaponDamage,
|
|
||||||
WeaponSpeed: *weaponSpeed,
|
|
||||||
},
|
|
||||||
ForceJSON: *forceJSON,
|
ForceJSON: *forceJSON,
|
||||||
StateStream: make(chan *server.Boardstate),
|
StateStream: make(chan *server.Boardstate),
|
||||||
Die: make(chan struct{}),
|
Die: make(chan struct{}),
|
||||||
}
|
}
|
||||||
|
sr := server.StatsRequest{
|
||||||
|
Hp: *hp,
|
||||||
|
Speed: *speed,
|
||||||
|
Acceleration: *acceleration,
|
||||||
|
ScannerRadius: *scannerRadius,
|
||||||
|
TurnSpeed: *turnSpeed,
|
||||||
|
FireRate: *fireRate,
|
||||||
|
WeaponRadius: *weaponRadius,
|
||||||
|
WeaponDamage: *weaponDamage,
|
||||||
|
WeaponSpeed: *weaponSpeed,
|
||||||
|
}
|
||||||
|
|
||||||
switch *botType {
|
switch *botType {
|
||||||
case "simple":
|
case "simple":
|
||||||
c.Player = client.NewSimplePlayer(800, 600, c.StatsReq)
|
c.Player = client.NewSimplePlayer(800, 600, sr)
|
||||||
case "fraserbot":
|
case "fraserbot":
|
||||||
c.Player = client.NewFraserbot("Fraserbot", c.StatsReq)
|
c.Player = client.NewFraserbot("Fraserbot", sr)
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
Loading…
Reference in New Issue
Block a user