2015-02-04 21:08:44 -08:00
|
|
|
package robo
|
|
|
|
|
2015-02-04 21:35:25 -08:00
|
|
|
import "log"
|
|
|
|
|
2015-02-04 21:08:44 -08:00
|
|
|
const Port = 1337
|
2015-02-04 21:24:45 -08:00
|
|
|
|
2015-02-05 21:34:35 -08:00
|
|
|
type Robot struct {
|
|
|
|
X, Y, W float64
|
|
|
|
}
|
|
|
|
|
|
|
|
type Ball struct {
|
2015-02-04 21:24:45 -08:00
|
|
|
X, Y float64
|
|
|
|
}
|
2015-02-04 21:35:25 -08:00
|
|
|
|
2015-02-05 21:34:35 -08:00
|
|
|
type Event struct {
|
|
|
|
Players []Robot `json:"players"`
|
|
|
|
Enemies []Robot `json:"enemies"`
|
|
|
|
Ball Ball `json:"ball"`
|
|
|
|
}
|
|
|
|
|
2015-02-04 21:35:25 -08:00
|
|
|
func init() {
|
|
|
|
log.SetFlags(log.Lmicroseconds | log.Lshortfile)
|
|
|
|
}
|