Skip to content

Confirm on pass if insufficient resources#71

Merged
coyotte508 merged 7 commits intoboardgamers:masterfrom
mtpauly:resource-pass-plant-check
Aug 9, 2025
Merged

Confirm on pass if insufficient resources#71
coyotte508 merged 7 commits intoboardgamers:masterfrom
mtpauly:resource-pass-plant-check

Conversation

@mtpauly
Copy link
Contributor

@mtpauly mtpauly commented Aug 4, 2025

Summary of change

Players can no longer accidentally skip buying resources while lacking enough to power all plants. When attempting to pass during the Resources phase without sufficient resources, the UI now prompts for confirmation.

This helps prevent accidental misplays and makes the consequence of passing explicit. The sufficiency check accounts for hybrid plants that can use either coal or oil, ensuring the prompt reflects real options.

Testing

Verified manually by running through scenarios in the provided viewer.

Players can no longer accidentally skip buying resources while lacking
enough to power all plants. When attempting to pass during the Resources
phase without sufficient resources, the UI now prompts for confirmation.

This helps prevent accidental misplays and makes the consequence of
passing explicit. The sufficiency check accounts for hybrid plants that
can use either coal or oil, ensuring the prompt reflects real options.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a confirmation prompt when players attempt to pass during the Resources phase without having sufficient resources to power all their plants. The change aims to prevent accidental misplays by making players explicitly confirm they want to skip resource purchasing when they lack adequate fuel.

  • Adds resource sufficiency checking logic that accounts for hybrid plants
  • Integrates confirmation prompt into existing pass validation flow
  • Imports Player type for the new functionality

@coyotte508
Copy link
Member

sorry for the additional commits, and thank you!

@coyotte508 coyotte508 merged commit abdcd73 into boardgamers:master Aug 9, 2025
3 checks passed
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.

3 participants