Documentation
¶
Index ¶
- Constants
- Variables
- func LoadBytes(p string) []byte
- type Game
- type Simulation
- func (s *Simulation) AddPlayer(player int, team int, state *playerState) error
- func (s *Simulation) Clear(frame int) error
- func (s *Simulation) Rewind(frame int) error
- func (s *Simulation) SetInput(player int, input bitfield) error
- func (s *Simulation) State() (map[int]*playerState, []*roundState, map[int]int, []*objectState)
- func (s *Simulation) Tick() error
Constants ¶
View Source
const ( SoundSelect soundEffect = iota SoundFire SoundHit SoundDestroy )
View Source
const ( InputLeftForward bitfield = 1 << iota InputLeftBackward InputRightForward InputRightBackward InputTurretLeft InputTurretRight InputFire )
View Source
const ( ObjectTree objectType = iota ObjectTreeDestroyed ObjectSnowman ObjectSnowmanDestroyed ObjectHouse )
View Source
const (
SnowSize = 1024
)
Variables ¶
View Source
var ( TreadMarkImage = ebiten.NewImage(3, 3) RoundImage = ebiten.NewImage(4, 4) IndicatorImage = ebiten.NewImage(75, 75) CooldownImage = ebiten.NewImage(cooldownWidth, cooldownHeight) ObjectImages = make([]*ebiten.Image, len(objectNames)) )
View Source
var SnowImage = loadImage("asset/image/snow.png")
View Source
var (
Sounds [][]byte
)
Functions ¶
Types ¶
type Simulation ¶
type Simulation struct {
// contains filtered or unexported fields
}
func NewSimulation ¶
func NewSimulation(seed int64, allTanks bool, godMode bool) *Simulation
func (*Simulation) AddPlayer ¶
func (s *Simulation) AddPlayer(player int, team int, state *playerState) error
func (*Simulation) Clear ¶
func (s *Simulation) Clear(frame int) error
func (*Simulation) Rewind ¶
func (s *Simulation) Rewind(frame int) error
func (*Simulation) SetInput ¶
func (s *Simulation) SetInput(player int, input bitfield) error
func (*Simulation) State ¶
func (s *Simulation) State() (map[int]*playerState, []*roundState, map[int]int, []*objectState)
func (*Simulation) Tick ¶
func (s *Simulation) Tick() error
Click to show internal directories.
Click to hide internal directories.