feat: dungeon generation — BSP rooms, room types, fog of war

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 23:50:43 +09:00
parent 4fdd7a1ad0
commit 8849bf5220
4 changed files with 161 additions and 0 deletions

27
dungeon/fov.go Normal file
View File

@@ -0,0 +1,27 @@
package dungeon
type Visibility int
const (
Hidden Visibility = iota
Visited
Visible
)
func UpdateVisibility(floor *Floor) {
for i, room := range floor.Rooms {
if i == floor.CurrentRoom {
room.Visited = true
}
}
}
func GetRoomVisibility(floor *Floor, roomIdx int) Visibility {
if roomIdx == floor.CurrentRoom {
return Visible
}
if floor.Rooms[roomIdx].Visited {
return Visited
}
return Hidden
}