v0.1.1 api with fiber added, basic functionlity tested

This commit is contained in:
2025-10-27 05:16:08 -04:00
parent 8ba4357920
commit b98ea83012
9 changed files with 941 additions and 8 deletions

View File

@ -224,6 +224,14 @@ func (s *Service) GetGame(gameID string) (*game.Game, error) {
return g, nil
}
func (s *Service) DeleteGame(gameID string) error {
if _, ok := s.games[gameID]; !ok {
return fmt.Errorf("game not found: %s", gameID)
}
delete(s.games, gameID)
return nil
}
func (s *Service) Close() error {
if s.engine != nil {
return s.engine.Close()