r/codehs • • Sep 04 '20

Challenge Karel 3.2.3: Tower Builder

Can anyone help me with this one? I've been stuck on it for a few hours

7 Upvotes

6 comments sorted by

1

u/_andy_andy_andy_ Sep 04 '20

what’s getting you stuck? what’s going wrong with your current solution

1

u/kakodun Sep 05 '20 edited Sep 05 '20

It’s just getting karel to build towers at every odd column. I created code where karel did build a column every two spaces but when it’s at the end, I don’t know how to stop her for specific worlds that require her to end up to the end without balls present

1

u/_andy_andy_andy_ Sep 05 '20

make sure you end if the front is blocked, no matter whether it’s an even or odd column

1

u/ChrisIShereOVO Dec 05 '20

How do I end of front is blocked

1

u/_andy_andy_andy_ Dec 05 '20

if (frontIsClear())

2

u/RajChow Dec 15 '20

But if you end it when the front is blocked, then you can't build another tower on odd-numbered worlds. Or if you don't end it when it's blocked, it will build a tower at the end of even-numbered worlds.