Anonymous user
Maze generation: Difference between revisions
m
→{{header|C sharp|C#}}
Line 1,657:
for (var x = 0; x < _width; x++)
{
sbTop.Append(this[x, y].HasFlag(CellState.Top) ? "+---" : "+ ");
sbMid.Append(this[x, y].HasFlag(CellState.Left) && !(x == 0 && y == 0) ? "| " : " ");
}
if (firstLine == string.Empty)
Line 1,681:
Sample output:
<pre>
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+ +---+
| |
+ + +---+
| |
+ + +---+---+ + +
| | |
+
|
+
|
+
|
+
|
+
| | | | | | | | | | | | |
|
+ +---+
|
+
| | | | | | |
+ +
| |
| | | | | | | |
+
|
+
| | |
+
| | | | | |
+
|
| |
+ +---+---+---+ + +---+
|
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---
</pre>
|