Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameClient ¶
type GameClient struct {
CurrentPlayer uuid.UUID
Stream proto.Game_StreamClient
Game *backend.Game
View *frontend.View
// contains filtered or unexported fields
}
GameClient is used to stream game information to a server and update the game state as needed.
func NewGameClient ¶
func NewGameClient(game *backend.Game, view *frontend.View) *GameClient
NewGameClient constructs a new game client struct.
func (*GameClient) Connect ¶
func (c *GameClient) Connect(grpcClient proto.GameClient, playerID uuid.UUID, playerName string, password string) error
Connect connects a new player to the server.
func (*GameClient) Exit ¶
func (c *GameClient) Exit(message string)
Exit stops the tview application and prints a message. This is needed as stdout is mangled while tview is running.
func (*GameClient) Start ¶
func (c *GameClient) Start()
Start begins the goroutines needed to recieve server changes and send game changes.
Click to show internal directories.
Click to hide internal directories.