[Community Puzzle] ASCII Art with Logo Language

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Eulero314,validated by @cedricdd,@DeanTheMachine and @McKael.
If you have any issues, feel free to ping them.

It is my first time writing feedback on a puzzle.Overall the challenge was cool, take me 2 or 3 hours ish to do it, I was not focusing to much on the time I was taking. I really like the idea to write a parser and interpeter after that. I see a couple of edge was not great exemple using the character ‘;’ clearing the screen. like “CS ;” and after that if you use multiple line that finish like this CS ;;FD 1; So if people that simply try to split the instruction by ; that will not do it. So I write a parser that support it correctly, but in the end I suppose that was overkill because no exemple was using the ; for display. I used reflection to link every command to a function. So I was adding new command was simply add a method in my class. I only supported two type of parameter: Char and Integer. I liked the idea but in the end I find all the documentation maybe lacking on the behavior of the screen. When you tell me “Clearscreen” in my head you have size. So I in the end I create a virtual screen that can write character in the negative number and before rendering, I simply calculate my bounding region of character to draw it and triming the end of line. In the end, I have no idea how I make everything work first try. I am a little bit supprise. But I feel frustrated during all the time writing the code because, I was taking a lot of guess on the wanted output. Maybe add more comment on the requirement.

1 Like

I’m not sure what it means to “clear screen” with a character other than space, when there is no defined size of screen and only spaces are to be omitted in the output. Following a “CS .” program, how many lines of what length of “.” should be printed?

Is it based on a bounding box of non-background characters? If there are trailing background characters in a line, should they be omitted in the same way that spaces are described to be omitted?

The statement says:

All leading spaces should be removed only to the extent that the overall image is not affected. All unnecessary spaces at the end of the lines should be removed.

So, you won’t know what the final output width and height (i.e. final boundaries) are until you go through the entire program. What you can try is to keep track of the pixels which are not blank, and at the end when you know the final output width and height, you can do a clear screen to the pixels which are blank. (This is an acceptable approach because there won’t be more than one CS with different characters in any of the cases.)