You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title: Advanced Gameplay Logic and Enhanced API Endpoints for Nomic Game
Description:
Enhance the existing Nomic game's API endpoints and gameplay logic to support a comprehensive game lifecycle. This includes dynamic rule enforcement, advanced move validation, and robust game state management to ensure an engaging and interactive gaming experience.
Prerequisites:
Review the existing implementation of player interaction endpoints.
Familiarize with the existing database schema, particularly the Game and Rule models.
Acceptance Criteria:
Game Lifecycle Management:
Develop a service to manage the game lifecycle, including starting, pausing, and ending games.
Endpoint for starting a game (/game/{game_id}/start): Initializes the game state and notifies all players.
Endpoint for ending a game (/game/{game_id}/end): Finalizes the game state, provides a summary, and declares a winner if a player reaches 100 points.
Dynamic Rule Enforcement:
Enhance the /propose-rule/{game_id} endpoint to validate new rules against existing game constraints before submission.
Implement middleware to enforce active rules for each player's turn and move submission.
Move Validation System:
Update the /make-move/{game_id} endpoint to validate player moves based on the current ruleset dynamically.
Integrate a rules engine to apply game rules to moves and actions in real-time.
Real-time Game State Updates:
Synchronize game state updates across all players after every action, rule proposal, and vote to ensure consistent gameplay.
Use WebSockets to push real-time updates to clients.
Voting System Enhancements:
Revise the voting mechanism to manage tiebreakers and handle abstentions effectively.
Implement a timed voting process with automatic resolution for non-votes, ensuring that a majority is needed for a vote to pass.
Rule Change Implementation:
Establish a system for immediate application of non-code-related rule changes.
Outline a procedure for code-required rule changes, including pull request creation and review protocols.
Documentation and Examples:
Update the Swagger UI documentation for all new and revised endpoints.
Provide detailed examples and guidance in the Swagger UI for engaging with the updated game logic.
Testing:
Develop unit tests for new game state management and rule enforcement logic.
Execute integration tests to validate the complete game process, including rule changes and the scoring mechanism.
Rule Violation Handling:
Implement a voting system to determine rule violations. If confirmed, the violating player's turn is skipped.
Deliverables:
A complete suite of endpoints supporting advanced Nomic gameplay functionalities.
Real-time synchronization of the game state across all participants.
Comprehensive documentation for developers and players on how to interact with the enhanced game features.
Note for Developers:
Maintain backward compatibility with established game rules and player interactions.
Focus on creating a seamless and intuitive player experience, with clear, immediate feedback for all in-game activities.
Additional context, here's an example game interaction
Steve takes action.
This is a string broadcast by Steve in which he describes himself doing something to confirm he’s following the rules of the game. For example, if there is a rule that each player must drink a glass of water before proposing a rule, here Steve would post “drinks a glass of water”
All players vote on whether Steve’s action complies with all rules. If they vote no, his turn is skipped
Steve proposes rule change as described in standard Nomic
All players vote to approve or reject the rule change which will be applied for the next user’s turn (if it’s a regular rule) or some time later if it’s a code change
Steve roles 2 dice to determine what points Steve gains
Next player’s turn
Title: Advanced Gameplay Logic and Enhanced API Endpoints for Nomic Game
Description:
Enhance the existing Nomic game's API endpoints and gameplay logic to support a comprehensive game lifecycle. This includes dynamic rule enforcement, advanced move validation, and robust game state management to ensure an engaging and interactive gaming experience.
Prerequisites:
Acceptance Criteria:
Game Lifecycle Management:
/game/{game_id}/start
): Initializes the game state and notifies all players./game/{game_id}/end
): Finalizes the game state, provides a summary, and declares a winner if a player reaches 100 points.Dynamic Rule Enforcement:
/propose-rule/{game_id}
endpoint to validate new rules against existing game constraints before submission.Move Validation System:
/make-move/{game_id}
endpoint to validate player moves based on the current ruleset dynamically.Real-time Game State Updates:
Voting System Enhancements:
Rule Change Implementation:
Documentation and Examples:
Testing:
Rule Violation Handling:
Deliverables:
Note for Developers:
Steve takes action.
This is a string broadcast by Steve in which he describes himself doing something to confirm he’s following the rules of the game. For example, if there is a rule that each player must drink a glass of water before proposing a rule, here Steve would post “drinks a glass of water”
All players vote on whether Steve’s action complies with all rules. If they vote no, his turn is skipped
Steve proposes rule change as described in standard Nomic
All players vote to approve or reject the rule change which will be applied for the next user’s turn (if it’s a regular rule) or some time later if it’s a code change
Steve roles 2 dice to determine what points Steve gains
Next player’s turn
From https://docs.google.com/document/d/1UXFIwpAGgFR10Y6q5zbOCx7RdL-VSXaGLZD3XHa3IBw/edit
The text was updated successfully, but these errors were encountered: