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.