Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Players can move the opponent's pawns #116

Closed
skythub opened this issue Dec 3, 2024 · 3 comments
Closed

Players can move the opponent's pawns #116

skythub opened this issue Dec 3, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@skythub
Copy link

skythub commented Dec 3, 2024

Description

In the chess-tui game, players can move the opponent's pawns, which violates the rules of chess. This issue disrupts the gameplay by allowing unintended moves that break the turn-based logic.

To Reproduce

  • Start a game in chess-tui.
  • Attempt to move a pawn belonging to the opponent.
  • Observe that the move is allowed, even though it should not be.

Expected behavior

Players should only be able to move pieces of their own color and only on their turn. The game should restrict pawn movement to adhere to the rules of chess.

Screenshots

If applicable, add screenshots, gifs or videos to help explain your problem.

Environment

  • OS: Linux
  • Terminal Emulator: Gnome Console
  • Font: MesloLGS
  • Crate version: 1.5.0

Additional context

To resolve this issue, the game logic should validate the turn and restrict movement to pieces belonging to the active player. This would ensure the integrity of the gameplay and adherence to chess rules.

PS: I stumbled across this project by chance and I like the idea, great initiative and several ideas to propose. I will surely contribute in my spare time.

@skythub skythub added the bug Something isn't working label Dec 3, 2024
@thomas-mauran
Copy link
Owner

Hello @skythub thanks for your issue, I didn't managed to reproduce the bug in a normal game or against a bot, when starting as white I can't select the black pieces to make them move, do you have any screenshot so I can try to reproduce ?

@thomas-mauran
Copy link
Owner

Ok @skythub I managed to reproduce the bug and am fixing it as part of the multiplayer pr

@thomas-mauran
Copy link
Owner

This is in theory solved in the pr #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants