This code generates an ascii maze of up to size 30x30. If you try to generate a larger maze then you will likely run out of stack space. There is no way to increase the size of the stack in vbscript. Each cell in the maze is represented by a string of five characters such as "11110". The first four chars represent whether a wall is present ("1") or absent ("0") in the four directions "UDLR". The fifth char represents whether a cell has been visited ("1") or not ("0"). Each cell maintains its awareness of the four walls bounding …

Member Avatar
Member Avatar
+0 forum 2

Hello Everyone, I am creating the maze game in vb.net I found the way of creating the maze game is easy way. But now I want this to access the auto updates. - Fine I can do this. Now the ## problem is: ## How can I set the levels? I think I should create Dll File for each level. so whenever I update the level.dll and the user will be downloaded with it and he want to appear all level in game. **Is this Possible? ** I am thinking of, I dont want the user to download the full …

Member Avatar
Member Avatar
+0 forum 12

* I have to make a maze with 21 rows and 77 columns, allow some for the user's input and for messages. * It also has to have A multidimensional array containing the board. * A function to print the board. * Find the user's starting location (i.e. the location of the 'i') * Loop forever, doing the following: Print the board (using your handy board printing function) If the character is: 'w': move the 'i' up, if possible 'a': move the 'i' left, if possible 's': move the 'i' down, if possible 'd': move the 'i' right, if possible …

Member Avatar
Member Avatar
+0 forum 3

Demonstrates the Right Hand Rule maze solving algorithm, with some sweet console colors and text display and erasing, in Windows. Note that if the Start is moved away from all the walls in the maze, the right hand rule fails, circling endlessly. Also, a similar failure happens if the Start is put onto an "island" part of the walls in the maze. This algorithm will not solve all mazes.

Member Avatar
+0 forum 0

I'm writing maze traversal for a school assignment, and I've got an issue. The X will move through most of the maze, but then it will get stuck at a position and keep cycling through. This is probably because I'm not checking properly to see if it hasn't been to a spot already. Here's my code: /* Name: Ryan Frappier Date: Program: Recursively moves an X through a maze Signature:____________________ */ #include "stdafx.h" #include <iostream> using namespace std; void printArray(char*[12], int); void mazeTraverse(char*[12], int, int, int, int); int _tmain(int argc, _TCHAR* argv[]) { // array of pointers char *maze[12]; // …

Member Avatar
Member Avatar
+0 forum 3

Ok final project of semester is to make a maze with gui , i started with the disjoint class already but am a bit confused on how the walls or cells will work with disjoint sets, has in how do i go about creating them will this work? , my thinking is making all of them true, has in they exist at the beggining and false when one is knocked down. protected boolean[][] horizontalWalls; protected boolean[][] verticalWalls; Now how would i go about combining this with my disjoint sets that keep track of the cells that are connected. Do i …

Member Avatar
Member Avatar
+0 forum 3

Here is my code.... It is supposed to go throught this maze and can move where there are "." and blocked by "#". I keep getting an out of bounds error. Can anyone help me? import java.io.*; public class ProgramMAZE { public static char maze[][]= {{'#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#'}, {'#', '.', '.', '.', '#', '.', '.', '.', '.', '.', '.', '#'}, {'.', '.', '#', '.', '#', '.', '#', '#', '#', '#', '.', '#'}, {'#', '#', '#', '.', '#', '.', '.', '.', '.', '#', '.', '#'}, {'#', '.', '.', '.', '.', '#', '#', …

Member Avatar
Member Avatar
+0 forum 2

So here is my problem. My program's goal is to to find the shortest path for a maze in a text file. User inputs a string and then the string goes through a function that reads the file into a 2d array. My problem is that I'm seperating the sources in to a header file and a seperate source file. And because of it I can't get it to work. Please help! My code with the functions is this: ...ps my error occurs in the readMaze funct. #include "maze.h" #include <iostream> #include <fstream> #include <string> using namespace std; void Maze:: …

Member Avatar
Member Avatar
+0 forum 1

Hi guys just wondering if anyone could give me some tips on starting a moveable char function for my maze game. I wish to create a function that allows me to move the player through the maze shown below. I have a few ideas on how to do this however the methods I am coming up with are slightly long winded. Just wondering if anyone had any examples or ideas. Below is the code I have so far [CODE]#include <stdio.h> #include <stdlib.h> #include <time.h> #include <iostream> #include <conio.h> #include <Windows.h> using namespace std; int col = 1; int row = …

Member Avatar
Member Avatar
+0 forum 2

I'm making a maze game for a project in school, and as such i need to create boundaries for the game. not only for the outer walls but also inner ones of different and sometimes not perfect squares. I was just wondering how i should go about doing this? Is there a way for the program to realize what colour it's about to go onto, then make plans accordingly? like the colour white is okay to walk on, but black isn't [CODE]import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Dimension; import java.util.Random; import java.awt.geom.Line2D; import java.awt.geom.Ellipse2D; import java.awt.geom.Rectangle2D; import java.awt.GridLayout; import …

Member Avatar
Member Avatar
+0 forum 1

Working on program to solve a predefined maze. I'm thinking the strings of spaces and #s should be arranged as strings or lists w/in a list, but not sure how to define spatial relationships so program can "move" through the maze. Just looking to help get started.

Member Avatar
Member Avatar
+0 forum 2

Hello people, I found a program on internet that reads 2 text files "maze.txt" and "randomMaze.txt" in which we can find *, space, S (for start) and E (for end). It resolves this maze by using DFS algorithm. My problem is that it does not run, it says there is a NullPoint exception error. Can you fix for me the problem please ? Here is the code: [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.Random; class Maze extends JFrame { public static void main(String args[]) { Maze f= new Maze(); f.setBounds(150,50,500,500); f.setVisible(true); } int maze[][]; //save the maze …

Member Avatar
Member Avatar
+0 forum 3

Hello people, I have a 2 dimensional array of integers where 0 indicates a road and 1 indicates a wall: can you give me a general idea on how to draw a maze according ot my matrix on JFrame window that has JPanel as its contente pane ? Thank you very much for any suggestion

Member Avatar
Member Avatar
+0 forum 7

Hello. I have some problems understanding the code. I'd like to ask for some help. I need someone to break it down for me. Just to explain what's going on and what's happening. Well this is map.cpp: I got the other bits but I am struggling with this one and I'd appreciate any help. [CODE]#include <iostream> #include <string> #include "map.h" #include <Windows.h> using namespace std; Map::Map() { map = new string[12]; map[0] = "XXXXXXXXXXXXXXXXXXXXXXXX"; map[1] = "X X XeX"; map[2] = "X X X X"; map[3] = "X X X"; map[4] = "X XX@XXXXXXXXXXXXXXXXX"; map[5] = "X X X"; map[6] …

Member Avatar
Member Avatar
+0 forum 9

Hello! I am trying to write a program using recursive functions to identify the path to a given maze. The thing that I am confused about is how to move to the next direction in order to check which way the path goes. For example: 000000 011100 010100 010110 0S00F0 000000 With this maze if I start at S, then I would have to check each side (left, right, up, and down) in order to see where the path continues. S-start F-finish 1-path 0-blocked. Here is the code I have so far: [CODE]#include <iostream> #include <fstream> using namespace std; enum …

Member Avatar
Member Avatar
+0 forum 12

I have written a program that will generate a random maze and solve it. The program uses a multidimensional array of a class that holds bool values for each wall, whether or not to show an * for the path taken, and if it is a dead end. here is the class [code=c]#include <cstdlib> using namespace std; class MazeCell { public: // ============================================================================================ // Routine: Class Constructor // Purpose: Allows setting the default values of the class when instantiated by the host. // ============================================================================================ MazeCell() { wallNORTH = false; wallEAST = false; wallSOUTH = false; wallWEST = false; path = …

Member Avatar
Member Avatar
+0 forum 1

Hello I am working on a project for my roommate that involves reading in a text file that has x's and o's. The x's mean a wall and the o's mean an open path. The maze begins at 0,0 and ends at 15, 15. This makes the graph 15x15. I was thinking about using Breadth-First Search to accomplish this as I am looking for the SHORTEST PATH to the end. I have been working on this for 10 hours today and can't think of a way to translate the path into a visible format. [CODE]Soxxxxooooooxxxx oooooooooooxoxxo xooooooxxxxoooox xoxxxoxoooooooox xxxoooxoooxxxxox ooooxxxxoooxooox …

Member Avatar
Member Avatar
+0 forum 5

Hey guys, I'm creating a Maze class along with a client class where it allows the user to input a direction (U/L/R/D), and then the validity of the move will be returned as well as the new position of the maze. So far, I've got this, but when I try to run it, two nullPointExceptions are thrown and I've tried fixing them but can't seem to understand as to why they're being thrown.. Any help would be appreciated, Ecliptical. [CODE]//Maze.Java //This program creates a maze, and allows the user to attempt to solve it through the client class. // // …

Member Avatar
Member Avatar
+0 forum 1

My teacher wrote this code. i am having trouble understanding what is going on in the code. can someone please help me by commenting in the program if you can tell me the importance of the functions and how everything works. please help me.... i'm a noob programmer #include <iostream> using namespace std; int col = 0; int row = 1; const int ROWMAX = 12; const int COLMAX = 12; char maze[ROWMAX][COLMAX] = { {'#','#','#','#','#','#','#','#','#','#','#','#'}, {'#',' ',' ',' ','#',' ',' ',' ',' ',' ',' ','#'}, {' ',' ','#',' ','#',' ','#','#','#','#',' ','#'}, {'#','#','#',' ','#',' ',' ',' ',' ','#',' ','#'}, {'#',' …

Member Avatar
Member Avatar
+0 forum 2

The End.