seigot / tetris

A Tetris Game for programming education in Japanese
MIT License
30 stars 107 forks source link

GitAuto: perfect clear(全消し)があった方がいいか検討 #148

Open gitauto-ai[bot] opened 1 month ago

gitauto-ai[bot] commented 1 month ago

Resolves #14

What is the feature

Introduce a "Perfect Clear" feature that awards bonus points when the entire field is cleared.

Why we need the feature

Adding a "Perfect Clear" element enhances the gameplay by providing an additional challenge for players. It rewards skillful play and encourages players to aim for complete clears, thereby increasing engagement and satisfaction.

How to implement and why

  1. Detecting a Perfect Clear:

    • Modify the game logic to check if all tiles on the field are cleared after a move.
    • Implement a function in the game manager that verifies the state of the field.
  2. Awarding Bonus Points:

    • Define the bonus points awarded for a Perfect Clear in the scoring system.
    • Update the scoring mechanism to add bonus points when a Perfect Clear is achieved.
  3. User Feedback:

    • Add visual indicators (e.g., animations or highlights) to notify the player of a Perfect Clear.
    • Incorporate sound effects to enhance the rewarding experience.
  4. Testing:

    • Write unit tests to ensure that the Perfect Clear detection and bonus awarding work correctly.
    • Perform gameplay testing to validate the feature under various scenarios.

Implementing the feature in this manner ensures a seamless integration with existing game mechanics while providing clear incentives for players to achieve Perfect Cleans.

About backward compatibility

The introduction of the Perfect Clear feature does not affect existing game functionality. It adds an optional bonus mechanism that can be toggled without disrupting current gameplay or scoring systems, maintaining full backward compatibility.

Test these changes locally

git checkout -b gitauto/issue-14-3cdc50d0-cda7-4b13-af87-e051cbe1019d
git pull origin gitauto/issue-14-3cdc50d0-cda7-4b13-af87-e051cbe1019d
gitauto-ai[bot] commented 1 month ago

Committed the Check Run build (3.10) error fix! Running it again...

gitauto-ai[bot] commented 1 month ago

Committed the Check Run build (3.9) error fix! Running it again...

gitauto-ai[bot] commented 1 month ago

Committed the Check Run MSBuild (3.9) error fix! Running it again...

gitauto-ai[bot] commented 1 month ago

Committed the Check Run MSBuild (3.10) error fix! Running it again...