Documentation
¶
Index ¶
- type MockGameRepository
- func (m *MockGameRepository) AddPlayer(player models.Player) error
- func (m *MockGameRepository) ComputeHighScores() ([]models.HighScore, error)
- func (m *MockGameRepository) HasIncompleteGames() bool
- func (m *MockGameRepository) IncompleteGames() ([]models.GameSave, error)
- func (m *MockGameRepository) LifetimeStats() (*models.LifetimeStats, error)
- func (m *MockGameRepository) LoadGame(gameID string) (models.GameSave, error)
- func (m *MockGameRepository) LoadGameState(gameID string) (models.GameState, error)
- func (m *MockGameRepository) PlayerLifetimeStats(playerID string) (*models.LifetimeStats, error)
- func (m *MockGameRepository) Players() ([]models.Player, error)
- func (m *MockGameRepository) SaveGame(save models.GameSave) error
- type MockTeaModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockGameRepository ¶
func NewMockGameRepository ¶
func NewMockGameRepository() *MockGameRepository
func NewMockGameRepositoryWithData ¶
func NewMockGameRepositoryWithData(players []models.Player, saves []models.GameSave) *MockGameRepository
func (*MockGameRepository) AddPlayer ¶
func (m *MockGameRepository) AddPlayer(player models.Player) error
AddPlayer adds a player to the mock repository
func (*MockGameRepository) ComputeHighScores ¶
func (m *MockGameRepository) ComputeHighScores() ([]models.HighScore, error)
ComputeHighScores computes the high scores
func (*MockGameRepository) HasIncompleteGames ¶
func (m *MockGameRepository) HasIncompleteGames() bool
HasIncompleteGames checks if there are incomplete games
func (*MockGameRepository) IncompleteGames ¶
func (m *MockGameRepository) IncompleteGames() ([]models.GameSave, error)
IncompleteGames returns all incomplete games
func (*MockGameRepository) LifetimeStats ¶
func (m *MockGameRepository) LifetimeStats() (*models.LifetimeStats, error)
LifetimeStats returns the lifetime stats
func (*MockGameRepository) LoadGame ¶
func (m *MockGameRepository) LoadGame(gameID string) (models.GameSave, error)
LoadGame loads a game from the mock repository by its ID
func (*MockGameRepository) LoadGameState ¶
func (m *MockGameRepository) LoadGameState(gameID string) (models.GameState, error)
LoadGameState loads the game state by its ID
func (*MockGameRepository) PlayerLifetimeStats ¶
func (m *MockGameRepository) PlayerLifetimeStats(playerID string) (*models.LifetimeStats, error)
PlayerLifetimeStats returns the lifetime stats for a player
type MockTeaModel ¶
MockTeaModel is a mock implementation of tea.Model for testing
func (*MockTeaModel) Init ¶
func (m *MockTeaModel) Init() tea.Cmd
func (*MockTeaModel) View ¶
func (m *MockTeaModel) View() string
Click to show internal directories.
Click to hide internal directories.