mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-21 19:28:03 +00:00
- Add grid unit constants (5x4 tiles) to constants.js - Create comprehensive grid conversion helper functions - Implement 4-direction room positioning (N/S/E/W) with breadth-first algorithm - Add door placement functions with CRITICAL fixes: * Negative modulo fix: ((sum % 2) + 2) % 2 for deterministic placement * Asymmetric alignment fix: single-door rooms align with multi-door rooms * Consistent grid alignment using Math.floor() for negative coordinates - Rewrite calculateRoomPositions to support variable room sizes - Update createDoorSpritesForRoom to use new placement system - Store room dimensions globally for cross-system access This implements the comprehensive room layout redesign as specified in planning_notes/new_room_layout with all critical fixes from review2. Addresses: Variable room sizes, proper door alignment, and grid-based positioning