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

@ -37,7 +37,7 @@ namespace DungeonGenerator
{
int numCandidates = 50; // Increasing improves results but greatly effects performance.
Random rnd = new Random();
int randomIndex = rnd.Next(_availablePoints.Count);
int randomIndex = rnd.Next(0, _availablePoints.Count);
Point bestCandidate = new Point(Int32.MaxValue, Int32.MaxValue);
int bestDistance = 0;
for (var i = 0; i < numCandidates; i++)