First pass of multibot support
This commit is contained in:
@@ -149,17 +149,6 @@ func DeriveStats(request StatsRequest) Stats {
|
||||
return s
|
||||
}
|
||||
|
||||
func (s StatsRequest) Valid() bool {
|
||||
total := (s.Speed + s.Hp + s.WeaponRadius +
|
||||
s.ScannerRadius + s.Acceleration + s.TurnSpeed + s.FireRate)
|
||||
|
||||
// allowing for 50 pts in every category
|
||||
if total > 500 {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Instruction struct {
|
||||
Message *string `json:"message,omitempty"`
|
||||
MoveTo *v.Point2d `json:"move_to,omitempty"`
|
||||
@@ -170,3 +159,7 @@ type Instruction struct {
|
||||
Scan *bool `json:"scan,omitempty"`
|
||||
Stats Stats `json:"stats"`
|
||||
}
|
||||
|
||||
type PlayerInstructions struct {
|
||||
RobotInstructions map[string]Instruction `json:"instructions"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user