Mercurial > projects > aid
annotate trunk/aid/maze/generate.d @ 0:4b2e8e8a633e
Repository setup.
author | revcompgeek |
---|---|
date | Mon, 03 Mar 2008 19:28:10 -0700 |
parents | |
children |
rev | line source |
---|---|
0 | 1 module ai.maze.generate; |
2 | |
3 import tango.math.Random; | |
4 | |
5 class MazeGenerator { | |
6 public: | |
7 MazeCell[][] generate(uint w, uint h){ | |
8 Random r = Random.shared; | |
9 MazeCell[][] maze = new MazeCell[w][h]; | |
10 uint x = r.next(w); | |
11 uint y = r.next(h); | |
12 | |
13 } | |
14 } | |
15 | |
16 struct MazeCell { | |
17 bool n=true,w=true,s=true,e=true,visited=false; | |
18 } |