-
Notifications
You must be signed in to change notification settings - Fork 0
/
gamestate.go
35 lines (32 loc) · 828 Bytes
/
gamestate.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package isledef
//GameState represents the current state of the game
type GameState interface {
Update(g *Game) error
Draw(g *Game) error
Msg() GameStateMsg
SetMsg(GameStateMsg)
}
//GameStateMsg represents the messages sent from the GameState that may change states
type GameStateMsg int
//These are the available GameStateMsg
const (
GameStateMsgNone GameStateMsg = iota
GameStateMsgReqTitle
GameStateMsgReqMain
GameStateGameOver
GameStateGameWin
GameStateMsgReqMainMenu
GameStateMsgReqBattle
GameStateMsgPause
GameStateMsgUnPause
GameStateMsgReqMPStage
GameStateMsgReqMPMain
GameStateMsgReqMPMainMenu
GameStateMsgReqLostConnection
GameStateMsgReqBattleCharacterSelect
GameStateMsgReqMPHelp
GameStateMsgReqMPGameOverWin
GameStateMsgReqMPGameOverLose
GameStateMsgReqHostingRooms
GameStateMsgReqSetIP
)