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

Implement role-specific night actions [Copilot Workspace] #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sadrasabouri
Copy link
Owner

@sadrasabouri sadrasabouri commented May 2, 2024

Related to #7

Implements role-specific action fields for night actions and updates server logic to handle these actions.

  • Player Interface Update: Adds conditional rendering in templates/Player.html to display action fields (Night Kill, Detection, Save) based on the player's role. Players can now select targets for their night actions directly within the game interface.
  • Server Logic Enhancement: Updates mafia.py to include a new route /night_action for processing night action requests. This includes handling 'kill', 'detect', and 'save' actions based on form submissions.
  • Night Actions Processing: Introduces a placeholder function /process_night_actions in mafia.py for future implementation of night actions processing logic. Also, initializes a night_actions dictionary to store these actions temporarily.
  • General Improvements: Ensures that action fields are only shown to players marked as "alive" and dynamically updates the player's interface based on their actions during the night phase.

For more details, open the Copilot Workspace session.

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.

1 participant