Skip to content

Commit

Permalink
only save game if it has started
Browse files Browse the repository at this point in the history
  • Loading branch information
mytja committed Nov 12, 2023
1 parent 96db835 commit 0af1edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/internal/ws/gameend.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (s *serverImpl) EndGame(gameId string) {

results := make([]*messages.ResultsUser, 0)
for u, user := range game.Players {
if !user.GetBotStatus() {
if !user.GetBotStatus() && game.Started {
h := user.GetGameHistory()
marshal, err := json.Marshal(h)
if err == nil {
Expand Down

0 comments on commit 0af1edc

Please sign in to comment.