tweaks
This commit is contained in:
parent
10ffba1cdf
commit
73bceedf56
|
@ -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 {
|
||||
|
|
|
@ -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++
|
||||
}
|
||||
|
|
|
@ -118,6 +118,6 @@ func teamColors(ts []game.Team) map[*game.Team]pixel.RGBA {
|
|||
}
|
||||
|
||||
const (
|
||||
botWidth float64 = 20
|
||||
botWidth float64 = 17
|
||||
batonWidth float64 = 12
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue