+ 3

Obstacle game

To all the people on sololearn i have a great challenge for you today. Lets develope a code for the below stated game problem, lets see how good are your problem solving and coding skills. Here is the question: Given an n*n Array Matrix(A) with A[0][0] element as the starting point and any one element as the destination. Find the destination and print the route map. Rules: 1.Array matrix with n*n elements such that n>=2 and n<=10 2.Starting point A[0][0] value will be 'A'. 3.Destination value will be 'D'. 4. There will always be 1 continous route which can be straight or diagonal 5.There are 4 types of hurdles and corresponding values : a. Stone denoted by 'S' b. Wall denoted by 'L'. c. Water denoted by 'W'. d. Thorn denoted by 'T'. Music provides mind peace, which is denoted by 'M', this is not a hurdle. 6. Value of route will be 'R'. Constraints: 2<=N<=20; Input format: First line contains dimension N of matrix A. Next N lines each contains N values delimited by space. Output format- At every step print the surrounding hurdles in ascending order of values. i.e. for every 'R' print the surrounding hurles. If there are no hurdles around the step print 'NO HURDLES'. On reaching the destination print DESTINATION. Music M is not a hurdle , it should not be printed in output. Example: Input : 4 A S L D T R W R R M S R W R R M Output: L S S T W T W S W S S W L S W DESTINATION -------- No language restriction, prefer java and python. Lets see people how many are true worthy of the title "PROGRAMMER". Enjoy folks.

9th Aug 2018, 3:12 PM
MOHD SHADAN KHAN
MOHD SHADAN KHAN - avatar
3 Respostas
+ 2
But don't more easier create this game on some game engines? I think that programmers don't need to invent a bicycle --- other way round, they need to move progress by creating some innovations, I think) Please excuse me if I don't right answer your question. And also excuse me for my English, too) I'm Ukrainian, by the way)))
14th Aug 2018, 10:26 AM
GGLinker
GGLinker - avatar
+ 2
its alright man! the question i have asked is not just about making the program for the game. But it also enhances the logic building skills as well as programming skills.
14th Aug 2018, 1:23 PM
MOHD SHADAN KHAN
MOHD SHADAN KHAN - avatar
0
Yes
3rd Jul 2023, 5:12 PM
Sangeetha Sangeetha
Sangeetha Sangeetha - avatar