Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private int recSolve(Point pos)
- {
- if (blockState[pos.Y, pos.X] == mazeblock.Target)
- {
- return 1;
- }
- newDirections = new List<Point>();
- possibleDirections(pos);
- blockState[pos.Y, pos.X] = mazeblock.Visited;
- canvas.SetBBScaledPixel(pos.X, pos.Y, Color.Purple);
- Thread.Sleep(20);
- if(newDirections.Count > 0)
- {
- foreach(Point p in newDirections)
- {
- recSolve(p);
- }
- }
- else
- {
- canvas.SetBBScaledPixel(pos.X, pos.Y, Color.LightGreen);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement