Đã Đóng

Build a 2D maze using recursion

Overview

A maze is a networks of paths in which it is hard to find the exit.

What you must do

You must code a maze game in a 2D array of 20 rows by 30 columns. The player starts at an index of

the 2D array, at one of the edges of the array, and the exit of the maze is on another index, at another

edge of the array. The player wins as soon as he or she reaches the exit.

Note: you must use functions, and at least 2 functions must be recursive.

The maze’s representation in the 2D array

To simplify things, the game will be printed to the screen with textual characters. And so, the player

will be represented by a P, the exit will be represented by an E, an obstacle will be represented by an X,

and a path will be represented by a space.

Your program, step by step

First, the 2D array is shown (printed) on the screen, showing the player, the exit, the obstacles, and

the paths.

Second, you use a prompt to ask the player to enter a direction, using the following message:

Which way do you want to go?

The direction entered by the player can be: up, down, left, or right. The directions can also be

represented by the letters u, d, l, r.

If the player's input is invalid, either because it is not one of the valid words (or letters) or because the

direction entered goes into an obstacle or outside the array, you print the message “invalid

direction” to the screen and you ask the player for a direction again.

If the player's input is valid, you move on the to the next step.

Third, the 2D array is shown (printed) on the screen again with all of its information, showing the

player in his/her new position, the exit, the obstacles, and the paths.

Fourth, the program detects if the player (P) has reached the exit (E). If yes, then the message “You

have reached the exit!” is shown on the screen, and the program ends. If the player has not

reached the exit, the program goes back to the second step.

Kĩ năng: Lập trình C++, Java, Lập trình C, Kiến trúc phần mềm, Thuật toán

Xem nhiều hơn: build sample website using dotnetnuke, build joomla template using photoshop, build dealer locator using coldfusion, system requirements build inventory system using php mysql, fibonacci series using recursion, build job site using cakephp, build interactive calendar using visual basic, build online exam using asp, build xml file using crystal, build solar system using maya, build university crest using cs3, build web application using netbeans mysql, build ecommerce website using oscommerce part, build comment system using php, psd 2 html using theme - work right now and all night, how to build a dashboad using mysqli php javascript and css, solving maze using recursion, using recursion in models and decision making

Về Bên Thuê:
( 0 nhận xét ) Montreal, Canada

ID dự án: #22746704

22 freelancer đang chào giá trung bình $113 cho công việc này

dobreiiita

Hello I am Java and Algorithm expert and interested in the project. I have reviewed details of the maze program you posted and confident to handle it perfectly. I will keep codes simple and well documented. Please c Thêm

$100 CAD trong 1 ngày
(577 Nhận xét)
7.7
hbxfnzwpf

I am very proficient in c and c++. I have 18 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ Thêm

$120 CAD trong 2 ngày
(172 Nhận xét)
7.1
schoudhary1553

Hello Sir, I am expert who understands the value of time. I pride myself in my attention to detail. I am very hard working and aim to deliver in less time than quoted. I want to make you, my employer happy without cha Thêm

$220 CAD trong 4 ngày
(73 Nhận xét)
6.4
umg536

Hi there, Being an expert in C, and C++ programming I can do this project for you. please leave a message on my chat so we can discuss the budget and deadline of the project. Also, have a look at my profile for my rev Thêm

$250 CAD trong 4 ngày
(26 Nhận xét)
6.3
chomsengdev

Hi sir, I have read your project description and I am interested in the project. As you can see my profile, I am a full-time developer and have just completed many projects. Specially, I have wide experience in C/C Thêm

$200 CAD trong 2 ngày
(10 Nhận xét)
5.3
xayyavong813

Hi sir, how are you? I have 8+ years of experience in C#/C++/JAVA programming. I have read your project description fully. I can understand and finish it wonderfully . I guarantee high project development and quali Thêm

$200 CAD trong 2 ngày
(4 Nhận xét)
4.8
vw2176756vw

Hello there, i can do you project. Let me know if you are interested. Details can be discus via chat. Best regards.

$150 CAD trong 7 ngày
(12 Nhận xét)
4.8
Alexsfodik

Hello. How are you. I'm software engineer and algorithm expert. I have many experiences in java, swing. I can apply my work to your time zone at any time. I am a responsible person who takes care the deadline and your Thêm

$200 CAD trong 7 ngày
(11 Nhận xét)
4.7
mzdesmag

hi, I have read the details of the project. I have worked as a Windows desktop/embedded *C/C++(MT4, 5)/C# developer for over 6 years, I have completed many simple and complex projects with Visual Studio and C++, some l Thêm

$40 CAD trong 1 ngày
(21 Nhận xét)
4.9
benmazouz

Let's Start now .

$100 CAD trong 1 ngày
(17 Nhận xét)
3.8
hsh564cf84accd96

I am writing this proposal in order to work for you in Software and Web Development. We are highly trained professional developers seeking to freelance and earn online. Having a flair in programming and development I Thêm

$30 CAD trong 7 ngày
(10 Nhận xét)
3.5
zuhairabbas14

Hi, I have read your project and found it quite similar to the projects and researches that I have done in the past, as a Java developer and AI researcher. Some of my work include: human activity recognition, urban sou Thêm

$200 CAD trong 7 ngày
(1 Nhận xét)
2.3
websiteappdev

Hi there, I’ve Built Similar LMS Portals. Please have a glance. [login to view URL] [login to view URL] It was awesome to see that your project is matching with my skills and knowledge. I've 10 years of experience in website Thêm

$140 CAD trong 7 ngày
(1 Nhận xét)
0.8
Trungdle

Hey man, this project sounds like a lot of fun. It will probably requires two recursive functions, one to generate the maze and one to check if the maze has a path to exit. The rest is just a loop until we find the exi Thêm

$30 CAD trong 2 ngày
(1 Nhận xét)
0.0
shivampathak339

I am a computer scientist and proficient with C++, Python, Data structures and algorithms. The problem seems to be an easy implementation problem. The project seems to be easy and I am ready to code it out. I can also Thêm

$30 CAD trong 1 ngày
(0 Nhận xét)
0.0
SekulicDusan

Hello there. I'm a ambitious Java Software Engineer and I can do this job for you in 2 days max. I am new on the site, but am experienced Java programmer. For additional information feel free to send me a message. Best Thêm

$120 CAD trong 2 ngày
(0 Nhận xét)
0.0
mklprudence

I am very passionate about computer science, and I have 6 years of computer programming experience in Java, JavaScript, and C++ language programming. For the 2 recursion function, I will probably use recursion for ma Thêm

$30 CAD trong 2 ngày
(0 Nhận xét)
0.0
fierarubogdan200

Hello. I'm new here. But I can do it in 1-2 hours max. Already done a similar game for university. The only question I have.. the maze is hardcoded? Or it is a generated one? If it is an hardcoded one or read from an Thêm

$30 CAD trong 1 ngày
(0 Nhận xét)
0.0
jsav2000

Hello! I have three versions of your project ready (C, C++ and Java)! You can chat me for further information. Giannis S. :)

$30 CAD trong 1 ngày
(0 Nhận xét)
0.0
gavaaurel

This sounds interesting. I was doing some research on maze generating algorithms and it seems preety straightforward. Java would be my programming language of choice. Let me know if you're interested in working with me Thêm

$140 CAD trong 7 ngày
(0 Nhận xét)
0.0