This commit is contained in:
Luke Meyers 2020-02-07 15:56:15 -08:00
parent 10ffba1cdf
commit 73bceedf56
3 changed files with 3 additions and 6 deletions

View File

@ -1,9 +1,5 @@
package game
import (
"math/rand"
)
type command int
const (
@ -15,7 +11,7 @@ const (
func doCommand(cmd command, s State, teamID int) State {
da := 1
da += rand.Intn(3) - 1
//da += rand.Intn(3) - 1
b := activeBot(s.Teams[teamID])
if b == nil {

View File

@ -25,6 +25,7 @@ func moveBot(s State, teamID int, b Bot) State {
for i := 0; i < b.v; i++ {
if o := collide(b.Pos+1, b.Lane, s); o != nil {
log.Printf("bot %d crashed into %#v!", b.ID, o)
break
} else {
b.Pos++
}

View File

@ -118,6 +118,6 @@ func teamColors(ts []game.Team) map[*game.Team]pixel.RGBA {
}
const (
botWidth float64 = 20
botWidth float64 = 17
batonWidth float64 = 12
)