Skip to content

Conversation

@Lonec-L
Copy link

@Lonec-L Lonec-L commented Jul 29, 2024

fixes #890

Checks if the game just started in the first 'full' game event handler and plays the start game sound.

Since the first 'full' event is always handled here, and we always receive a 'full' event when connecting to a new game, this seemed like an appropriate place for playing the starting sound.

Copy link
Contributor

@veloce veloce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing.

There is some logic to fix here. But I'm still not sure whether we want this or not.


_socketEventVersion = fullEvent.socketEventVersion;

if (game.status == GameStatus.started && game.steps.length == 1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic here should be more complicated than that.

One needs to ensure:

  • you are playing this game and not spectating it
  • you have not played a moved yet (so depending on the side, 0 or 1 move was played)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have not played a moved yet (so depending on the side, 0 or 1 move was played)

Not sure about that one - the web UI also seems to play the sound only if no move has been played at all yet.

@tom-anders
Copy link
Collaborator

@Lonec-L Are you still planning to work on this? Otherwise I might take a look at this myself

@Lonec-L
Copy link
Author

Lonec-L commented Nov 15, 2024 via email

@tom-anders
Copy link
Collaborator

@veloce you can close this PR as well (solved by #1159)

@veloce veloce closed this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No sound played when a game starts

3 participants