I have a problem with my homework. I need to do maze with 2 parametres. First parameter is list of strings which represent the maze by lines gradually from top to bottom. ('*' - wall, ' ' - field, 's' - starting position). At the beginning we are in position 's'.The second argument is a list of directions of movement ('d' - down, 'u' - up, 'l' - left, 'r' - right). Each letter means that we move one cell in that direction and to the new position we put character '.'
maze :: Result -> String -> Result
sampleInput =
["*********",
"*s* * *",
"* * * * *",
"* * * * *",
"* * *",
"******* *",
" *",
"*********"]
I really dont know what to do. Nothing works.
I will be grateful for any help.
At the end after doing all the steps I must print actual situation.
What I have tried:
The result should looked like this:
```
Prelude>pp(maze sampleInput "dddrruuurrdddrrddllllll")
*********
*s*...* *
*.*.*.* *
*.*.*.* *
*...*...*
*******.*
.......*
*********
```