Documentation ¶
Index ¶
- func GetImg(filename string, size int) *ebiten.Image
- type Ball
- type Font
- type FontText
- type Game
- func (g *Game) EndSet(player Player)
- func (g Game) IsLocal() bool
- func (g Game) IsRemoteClient() bool
- func (g Game) IsRemoteServer() bool
- func (g Game) Looser() *Player
- func (g Game) Mark(player *Player)
- func (g Game) MaxXSpeedSet() float32
- func (g *Game) ResetGame()
- func (g *Game) StartNewSet()
- func (g Game) Winner() *Player
- type GameMode
- type GameState
- type Impression
- type Options
- type Paddle
- type Player
- type PlayerSide
- type PlayerState
- type Position
- type Reset
- type ResumeGameState
- type Screen
- type Set
- type State
- type Win
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ball ¶
type Font ¶
type Game ¶
type Game struct { *GameState GameMode GameMode Title FontText Subtitle FontText Screen Screen PlayerL *Player PlayerR *Player Ball *Ball Win Win Debug bool }
func (Game) IsRemoteClient ¶
func (Game) IsRemoteServer ¶
func (Game) MaxXSpeedSet ¶
MaxXSpeedSet returns the max x speed of the sets
type GameState ¶
type GameState struct { *ResumeGameState CurrentState State Reset Reset }
type Impression ¶
type Impression struct { Position Image ebiten.Image }
type Paddle ¶
type Player ¶
type Player struct { *PlayerState Name string Side PlayerSide Paddle *Paddle Options Options UpdatePaddleY chan float32 }
Player is a player with a paddle and options
type PlayerSide ¶
type PlayerSide int
PlayerSide is an enum that represents the position of the player on the screen (LEFT or RIGHT)
const ( PlayerLeft PlayerSide = iota PlayerRight )
func (PlayerSide) String ¶
func (p PlayerSide) String() string
type PlayerState ¶
Player is a player with a paddle and options
type ResumeGameState ¶
type Screen ¶
type Screen struct {
Width, Height, RemoteExtendZoneW int
XLeft, XRight, YBottom, YTop float32
AvailableColors map[string]color.Color
Font Font
}
func (Screen) GameZoneHeight ¶
func (Screen) GameZoneWidth ¶
func (Screen) GameZoneXCenter ¶
func (Screen) GameZoneYCenter ¶
type Set ¶
type Set struct { StartTime time.Time EndTime time.Time PlayerLScore int PlayerRScore int PlayerSideWin PlayerSide XSpeed float32 }
func (Set) SpeedFormat ¶
Click to show internal directories.
Click to hide internal directories.