Skip to content

Commit

Permalink
fix: correctly end the race if all marble are not exploded (#57)
Browse files Browse the repository at this point in the history
* fix: explosion victory check if marble are in race instead of not exploded

* chore: add changelog entry
  • Loading branch information
florianvazelle authored Mar 22, 2024
1 parent f2ed8a9 commit ec75092
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
### Added
### Changed
- Correctly end the race if all marble are not exploded ([#57](https://github.com/MechanicalFlower/Marble/pull/57))
### Deprecated
### Removed
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion scripts/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func explosion_victory(_last_marble: Marble) -> bool:
var tmp_marble = null

for marble in _marbles:
if !marble.has_explode() and marble.visible:
if marble.in_race() and marble.visible:
marble_exploded_count += 1
if _last_marble != marble:
tmp_marble = marble
Expand Down

0 comments on commit ec75092

Please sign in to comment.