Documentation ¶
Overview ¶
menu create main menu of the game
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShowLeaderBoard ¶
func ShowLeaderBoard(ctx context.Context, client connection.Client, scanner *bufio.Scanner, startingHeader connection.StartingHeader) error
ShowLeaderboard displays the leaderboard with player statistics
Types ¶
type UserIntent ¶
type UserIntent uint8
UserIntent represents the user's intention from the main menu
const ( // WaitForChallenge indicates the user wants to wait for a challenge WaitForChallenge UserIntent = iota // ExitTheGame indicates the user wants to exit the game ExitTheGame // StartGame indicates the user wants to start a game StartGame )
func MainMenu ¶
func MainMenu(ctx context.Context, client connection.Client) UserIntent
MainMenu displays the main menu and handles user input
Click to show internal directories.
Click to hide internal directories.