Skip to content

fix: prevent Pacman from leaving the game board - #78

Open
Bhavesh-png wants to merge 1 commit into
dishu4u:mainfrom
Bhavesh-png:bugfix/pacman-boundary-clamp
Open

fix: prevent Pacman from leaving the game board#78
Bhavesh-png wants to merge 1 commit into
dishu4u:mainfrom
Bhavesh-png:bugfix/pacman-boundary-clamp

Conversation

@Bhavesh-png

Copy link
Copy Markdown

Pull Request

Description

This PR fixes an issue where Pacman could move outside the game board through the left and right tunnel gaps because no boundary check was applied to Pacman's movement.

The fix adds boundary validation for Pacman, similar to the existing boundary handling for ghosts, preventing Pacman from leaving the playable area while preserving the current game mechanics.

Fixes #76


Type of Change

  • Bug fix
  • New feature
  • UI improvement
  • Documentation update
  • Performance improvement

Checklist

  • My code follows the project style
  • I tested my changes
  • I have updated documentation if needed
  • My changes generate no new warnings

Screenshots (if applicable)

N/A (logic-only bug fix; no UI changes).

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.

[BUG] Pacman escapes the game board through tunnel gaps — no boundary clamp (unlike ghosts)

1 participant