-
Notifications
You must be signed in to change notification settings - Fork 8
/
interface.go
40 lines (37 loc) · 1020 Bytes
/
interface.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
36
37
38
39
40
package game
import (
"github.com/dascr/dascr-board/player"
"github.com/dascr/dascr-board/podium"
"github.com/dascr/dascr-board/settings"
"github.com/dascr/dascr-board/undo"
"github.com/dascr/dascr-board/ws"
)
// BaseGame will hold all the game specific stuff
// for all games combined
type BaseGame struct {
UID string
Game string
Player []player.Player
Variant string
In string
Out string
ActivePlayer int
ThrowRound int
GameState string
Message string
Settings *settings.Settings
UndoLog *undo.Log
Podium *podium.Podium
CricketController *CricketGameController
SoundToPlay string
}
// Game will be the interface for different games
type Game interface {
StartGame() error
GetStatus() BaseGame
GetStatusDisplay() BaseGame
NextPlayer(h *ws.Hub)
RequestThrow(number, modifier int, h *ws.Hub) error
Undo(h *ws.Hub) error
Rematch(h *ws.Hub) error
}