Fixed entrance rooms starting off of the boarder and improved clarity of printed map.

This commit is contained in:
Max 2025-02-04 17:14:41 +01:00
parent 64fbb67397
commit 024e0ae514
3 changed files with 65 additions and 42 deletions

View file

@ -1,8 +1,11 @@
using System.Collections.Generic;
namespace DungeonGenerator
{
public enum RoomType
{
Normal,
Entrance,
Monster,
}
@ -20,5 +23,19 @@ namespace DungeonGenerator
public int Height { get; set; }
public int Width { get; set; }
public Point PositionOfTopLeft { get; set; }
public List<Point> GetPointsInRoom()
{
List<Point> points = new List<Point>();
for (int i = 0; i < Width; i++)
{
for (int j = 0; j < Height; j++)
{
points.Add(new Point(PositionOfTopLeft.X + i, PositionOfTopLeft.Y + j));
}
}
return points;
}
}
}