there is a "contest" at my school about IT and programming. I chose Lua, so I'm asking here. (Because the CC community is really nice)
One of the tasks is this: (I'm translating from german->english, so there might be some mistakes, language-wise)
- A map file consists out of an "header", containing the height and width of the map.
After that, the actual map follows. # stands for a wall/tile you can't go to. A whitespace is a place where you can go. "K" stands for the starting position.
Example: http://pastebin.com/SQNXysfc (using pastebin because the codetags mess up the map.)
The first task is to code a program which is able to tell you if you can reach every "white" spot.
No problem i thought, and this is the result.
It "actually" works, but the program thinks the map I showed you earlier (as example) has spots you can't reach which is wrong (unless I have REALLY bad eyes.)
If someone would be nice enough to help me, I would be really thankful!
Greetings,
H4X0RZ