morpion

package
v0.0.0-...-a545287 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoPlayerColor = color.Transparent
View Source
var PlayerOColor = components.ColorRed
View Source
var PlayerXColor = components.ColorBlue

Functions

This section is empty.

Types

type GameState

type GameState []PlayerRef

type Grid

type Grid struct {
	// contains filtered or unexported fields
}

type GridGraphicComponent

type GridGraphicComponent struct {
	engine.GraphicComponentBase
	// contains filtered or unexported fields
}
type MainMenuControllerComponent struct {
	engine.ControllerComponentBase
	// contains filtered or unexported fields
}
func (mmcc *MainMenuControllerComponent) ConsumeGamepadEvents(events *[]controller.GamepadEvent, projection controller.GamepadProjection)
func (mmcc *MainMenuControllerComponent) ConsumeKeyboardEvents(events *[]controller.KeyboardEvent, projection controller.KeyboardProjection)
type MainMenuEntity struct {
	engine.EntityBase
	// contains filtered or unexported fields
}

func NewMainMenuEntity

func NewMainMenuEntity() *MainMenuEntity
func (mme *MainMenuEntity) Disable()
func (mme *MainMenuEntity) Enable()
func (mme *MainMenuEntity) FinalUpdate(dt time.Duration) bool
func (mme *MainMenuEntity) GetController() engine.ControllerComponent
func (mme *MainMenuEntity) Update(engine *engine.Engine, dt time.Duration) bool
type MainMenuGraphicComponent struct {
	engine.GraphicComponentBase
	// contains filtered or unexported fields
}
type MenuOption int

type MorpionGame

type MorpionGame struct {
	// contains filtered or unexported fields
}

func NewMorpionGame

func NewMorpionGame() *MorpionGame

func (MorpionGame) InitializeBuckets

func (mg MorpionGame) InitializeBuckets() []engine.EntityBucket

func (MorpionGame) InitializeGame

func (mg MorpionGame) InitializeGame(engine *engine.Engine)

func (MorpionGame) Name

func (mg MorpionGame) Name() string

type MorpionGameControllerComponent

type MorpionGameControllerComponent struct {
	engine.ControllerComponentBase
	// contains filtered or unexported fields
}

func (*MorpionGameControllerComponent) ConsumeGamepadEvents

func (mgcc *MorpionGameControllerComponent) ConsumeGamepadEvents(events *[]controller.GamepadEvent, projection controller.GamepadProjection)

func (*MorpionGameControllerComponent) ConsumeKeyboardEvents

func (mgcc *MorpionGameControllerComponent) ConsumeKeyboardEvents(events *[]controller.KeyboardEvent, projection controller.KeyboardProjection)

type MorpionGameEntity

type MorpionGameEntity struct {
	engine.EntityBase
	// contains filtered or unexported fields
}

func NewMorpionGameEntity

func NewMorpionGameEntity() *MorpionGameEntity

func (*MorpionGameEntity) Disable

func (e *MorpionGameEntity) Disable()

func (*MorpionGameEntity) Enable

func (e *MorpionGameEntity) Enable()

func (*MorpionGameEntity) FinalUpdate

func (e *MorpionGameEntity) FinalUpdate(dt time.Duration) bool

func (*MorpionGameEntity) GetController

func (e *MorpionGameEntity) GetController() engine.ControllerComponent

func (*MorpionGameEntity) Update

func (e *MorpionGameEntity) Update(engine *engine.Engine, dt time.Duration) bool

type MorpionScoresControllerComponent

type MorpionScoresControllerComponent struct {
	engine.ControllerComponentBase
	// contains filtered or unexported fields
}

func (*MorpionScoresControllerComponent) ConsumeGamepadEvents

func (mscc *MorpionScoresControllerComponent) ConsumeGamepadEvents(events *[]controller.GamepadEvent, projection controller.GamepadProjection)

func (*MorpionScoresControllerComponent) ConsumeKeyboardEvents

func (mscc *MorpionScoresControllerComponent) ConsumeKeyboardEvents(events *[]controller.KeyboardEvent, projection controller.KeyboardProjection)

type MorpionScoresEntity

type MorpionScoresEntity struct {
	engine.EntityBase
	// contains filtered or unexported fields
}

func NewMorpionScoresEntity

func NewMorpionScoresEntity() *MorpionScoresEntity

func (*MorpionScoresEntity) Disable

func (mse *MorpionScoresEntity) Disable()

func (*MorpionScoresEntity) Enable

func (mse *MorpionScoresEntity) Enable()

func (*MorpionScoresEntity) FinalUpdate

func (mse *MorpionScoresEntity) FinalUpdate(dt time.Duration) bool

func (*MorpionScoresEntity) GetController

func (mse *MorpionScoresEntity) GetController() engine.ControllerComponent

func (*MorpionScoresEntity) Update

func (mse *MorpionScoresEntity) Update(engine *engine.Engine, dt time.Duration) bool

type PlayerRef

type PlayerRef int
const (
	NoPlayer PlayerRef = -1
	PlayerX  PlayerRef = 0
	PlayerO  PlayerRef = 1
)

type PositionRef

type PositionRef int

type ScoresGraphicComponent

type ScoresGraphicComponent struct {
	engine.GraphicComponentBase
}

type TextGraphicComponent

type TextGraphicComponent struct {
	engine.GraphicComponentBase
	// contains filtered or unexported fields
}

type TokenGraphicComponent

type TokenGraphicComponent struct {
	engine.GraphicComponentBase
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL