McRogueFace/roguelike_tutorial
John McCardle 7aef412343 feat: Thread-safe FOV system with improved API
Major improvements to the Field of View (FOV) system:

1. Added thread safety with mutex protection
   - Added mutable std::mutex fov_mutex to UIGrid class
   - Protected computeFOV() and isInFOV() with lock_guard
   - Minimal overhead for current single-threaded operation
   - Ready for future multi-threading requirements

2. Enhanced compute_fov() API to return visible cells
   - Changed return type from void to List[Tuple[int, int, bool, bool]]
   - Returns (x, y, visible, discovered) for all visible cells
   - Maintains backward compatibility by still updating internal FOV state
   - Allows FOV queries without affecting entity states

3. Fixed Part 4 tutorial visibility rendering
   - Added required entity.update_visibility() calls after compute_fov()
   - Fixed black grid issue in perspective rendering
   - Updated hallway generation to use L-shaped corridors

The architecture now properly separates concerns while maintaining
performance and preparing for future enhancements. Each entity can
have independent FOV calculations without race conditions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 23:00:34 -04:00
..
mcrogueface_does_the_entire_tutorial_2025 draft lessons 2025-07-10 00:14:56 -04:00
part_0.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
part_1.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
part_1b.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
part_2-naive.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
part_2-onemovequeued.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
part_2.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
part_3.py feat: Thread-safe FOV system with improved API 2025-07-22 23:00:34 -04:00
part_4.py feat: Thread-safe FOV system with improved API 2025-07-22 23:00:34 -04:00
tutorial2.png Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
tutorial_hero.png Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00