event

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GameIDNewCustom = -2
	GameIDNewLocal  = -1
)
View Source
const (
	LogFormat = "2006-01-02 15:04:05"
)

Variables

This section is empty.

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 int
const (
	ActionUnknown GameAction = iota
	ActionRotateCCW
	ActionRotateCW
	ActionMoveLeft
	ActionMoveRight
	ActionSoftDrop
	ActionHardDrop
	ActionPing
	ActionStats
	ActionNick
)

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