Deviopath › Karel

Draw an X

Hard · Algorithms

Draw a big X in a square room: one diagonal line of balls from the bottom-left corner to the top-right corner, and another from the top-left corner to the bottom-right corner.

Your code runs in square rooms of odd and even sizes. In odd rooms the two lines cross on the middle square, which should still hold only one ball.

Next: Share Equally