event

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionUnknown   = ""
	ActionRotateCCW = "rotate-ccw"
	ActionRotateCW  = "rotate-cw"
	ActionMoveLeft  = "move-left"
	ActionMoveRight = "move-right"
	ActionSoftDrop  = "soft-drop"
	ActionHardDrop  = "hard-drop"
	ActionPing      = "ping"
	ActionStats     = "stats"
	ActionNick      = "nick"
)
View Source
const (
	GameColorI       = "i"
	GameColorO       = "o"
	GameColorT       = "t"
	GameColorJ       = "j"
	GameColorL       = "l"
	GameColorS       = "s"
	GameColorZ       = "z"
	GameColorIGhost  = "i-ghost"
	GameColorOGhost  = "o-ghost"
	GameColorTGhost  = "t-ghost"
	GameColorJGhost  = "j-ghost"
	GameColorLGhost  = "l-ghost"
	GameColorSGhost  = "s-ghost"
	GameColorZGhost  = "z-ghost"
	GameColorGarbage = "garbage"
	GameColorBorder  = "border"
)
View Source
const (
	GameIDNewCustom = -2
	GameIDNewLocal  = -1
)
View Source
const (
	LogFormat = "2006-01-02 15:04:05"
)

Variables

View Source
var DefaultColors = map[GameColor]string{
	GameColorJ:       "#2864ff",
	GameColorI:       "#00eeee",
	GameColorZ:       "#ee0000",
	GameColorO:       "#dddd00",
	GameColorT:       "#c000cc",
	GameColorS:       "#00e900",
	GameColorL:       "#ff7308",
	GameColorJGhost:  "#6e7bc3",
	GameColorIGhost:  "#6bbaba",
	GameColorZGhost:  "#ba6b6b",
	GameColorOGhost:  "#b1b16b",
	GameColorTGhost:  "#a16ba8",
	GameColorSGhost:  "#6bb76b",
	GameColorLGhost:  "#c3806c",
	GameColorGarbage: "#999999",
	GameColorBorder:  "#444444",
}

Functions

This section is empty.

Types

type DrawObject

type DrawObject int
const (
	DrawAll DrawObject = iota
	DrawMessages
	DrawPlayerMatrix
	DrawMultiplayerMatrixes
)

type Event

type Event struct {
	Player  int
	Message string
}

type GameAction

type GameAction string

type GameColor added in v0.1.8

type GameColor string

type GameOverEvent

type GameOverEvent struct {
	Event
}

type MessageEvent

type MessageEvent struct {
	Event
	Message string
}

type NicknameEvent

type NicknameEvent struct {
	Event
	Nickname string
}

type ScoreEvent

type ScoreEvent struct {
	Event
	Score int
}

type SendGarbageEvent

type SendGarbageEvent struct {
	Event
	Lines int
}

Jump to

Keyboard shortcuts

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