Skip to content

Feature/79 prevent invalid movement#80

Merged
ChrisKrane merged 6 commits intomainfrom
feature/79-prevent-invalid-movement
Apr 21, 2025
Merged

Feature/79 prevent invalid movement#80
ChrisKrane merged 6 commits intomainfrom
feature/79-prevent-invalid-movement

Conversation

@ChrisKrane
Copy link
Copy Markdown
Collaborator

@ChrisKrane ChrisKrane commented Apr 21, 2025

Description

This PR will prevent players from moving anything when not their turn.
It also introduces a wincondition check, causing the game to end when a king is captured.

##Notes:
Also fixes a bug with rematch system

This branch also contains the solution from #77

Related Issues

Closes: #79

Changes Made

  • Make game winnable when a king is captured
  • Make players unable to move pieces when not their turn

Checklist

Check applicable items

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented on my code where necessary.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@ChrisKrane ChrisKrane added enhancement New feature or request ready for review PR ready for reviewing priority - high labels Apr 21, 2025
@ChrisKrane ChrisKrane linked an issue Apr 21, 2025 that may be closed by this pull request
3 tasks
Copy link
Copy Markdown
Collaborator

@CraZyB1336 CraZyB1336 left a comment

Choose a reason for hiding this comment

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

LGTM!

@ChrisKrane ChrisKrane merged commit feb51e9 into main Apr 21, 2025
1 check passed
@ChrisKrane ChrisKrane deleted the feature/79-prevent-invalid-movement branch April 21, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority - high ready for review PR ready for reviewing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Prevent players from moving on other player turn

3 participants