Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hey!

You might be interested in a solution that uses less blocks (i would be). I might have been lucky, took me 2-3 minutes to find this.

https://blockly-games.appspot.com/maze?level=10#taj4p4

Does anyone know of a better one?

Edit: just as i posted this i saw that you dont even need the first "Move Forward", so it is 10 lines total with 4 blocks left



Had another look before I saw your comment, down to 3 blocks left now (12 lines). Thought my previous one was a bit messy, much better now, not sure if it can be optimised any further. Will check your link next. :)

EDIT: Nice. I was doing it slightly different to yours, https://blockly-games.appspot.com/maze?level=10#foif9x , two if statements instead would have fixed that, and the pattern becomes perfectly clear. Cheers. :)


5 blocks left (using 8 lines): https://blockly-games.appspot.com/maze?level=10#9zdu9f

But that's code bingo - fewer lines, but less efficient for the mouse.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: