Fixed bug where entrance lines on the left and right would start too far down.

This commit is contained in:
Max 2025-02-04 17:30:52 +01:00
parent 024e0ae514
commit d091a7f745
6 changed files with 131 additions and 3 deletions

View file

@ -35,7 +35,7 @@ namespace DungeonGenerator
// Can place point so that the x lengt hand y length go out of bounds to the right and down.
public Point GetPoint(int xLength, int yLength)
{
int numCandidates = 50; // Increasing improves results but greatly effects performance.
int numCandidates = 100; // Increasing improves results but greatly effects performance.
Random rnd = new Random();
int randomIndex = rnd.Next(0, _availablePoints.Count);
Point bestCandidate = new Point(Int32.MaxValue, Int32.MaxValue);