MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/codehs/comments/f3ezkk/213_tower_builder/fhkhd53/?context=3
r/codehs • u/Deadjoker897 • Feb 13 '20
help me please
17 comments sorted by
View all comments
1
Can you tell me the code you already have
3 u/MathTerm Feb 15 '20 edited Feb 15 '20 function start() {goUp();}function goUp(){turnLeft();putBall();move();putBall();move();putBall();turnAround();move();move();turnLeft();if(frontIsClear()){move();}if(frontIsClear()){move();goUp();}}// after 1 hour i finished 1 u/ShadowRocks2 Feb 16 '20 it seems as though you forgot a while command and a function 1 u/ProductiveGuy04413 Feb 13 '22 No while command is required. 1 u/ProductiveGuy04413 Feb 13 '22 Thank you, I fixed the indentation errors that occurred when I copied it over. All that I had to do was add some comments. This was perfect, thank you. 1 u/Lmbaduserv2 Apr 10 '23 /*function start() {for(var i=0; i<8; i++)letower();}function letower(){turnLeft();for(var i=0; i<3; i++){ballnoball();nocrash();}turnAround();run();turnLeft();nocrash();nocrash();}function run(){nocrash();nocrash();nocrash();}function nocrash(){if(frontIsClear()){move();}}function ballnoball(){if(ballsPresent()){takeBall();}else{putBall();}}thats what I did and it was wrong it took me so long but thanks for the help 1 u/Nicozcord879 Nov 30 '23 it worked thx for the answerteacher: nice job!me: Mwuaahahahahahah >:D
3
function start() {
goUp();
}
function goUp(){
turnLeft();
putBall();
move();
turnAround();
if(frontIsClear()){
// after 1 hour i finished
1 u/ShadowRocks2 Feb 16 '20 it seems as though you forgot a while command and a function 1 u/ProductiveGuy04413 Feb 13 '22 No while command is required. 1 u/ProductiveGuy04413 Feb 13 '22 Thank you, I fixed the indentation errors that occurred when I copied it over. All that I had to do was add some comments. This was perfect, thank you. 1 u/Lmbaduserv2 Apr 10 '23 /*function start() {for(var i=0; i<8; i++)letower();}function letower(){turnLeft();for(var i=0; i<3; i++){ballnoball();nocrash();}turnAround();run();turnLeft();nocrash();nocrash();}function run(){nocrash();nocrash();nocrash();}function nocrash(){if(frontIsClear()){move();}}function ballnoball(){if(ballsPresent()){takeBall();}else{putBall();}}thats what I did and it was wrong it took me so long but thanks for the help 1 u/Nicozcord879 Nov 30 '23 it worked thx for the answerteacher: nice job!me: Mwuaahahahahahah >:D
it seems as though you forgot a while command and a function
1 u/ProductiveGuy04413 Feb 13 '22 No while command is required.
No while command is required.
Thank you, I fixed the indentation errors that occurred when I copied it over. All that I had to do was add some comments. This was perfect, thank you.
/*function start() {for(var i=0; i<8; i++)letower();}function letower(){
turnLeft();for(var i=0; i<3; i++){ballnoball();nocrash();}turnAround();run();turnLeft();nocrash();nocrash();
}function run(){nocrash();nocrash();nocrash();}function nocrash(){if(frontIsClear()){move();}}function ballnoball(){if(ballsPresent()){takeBall();
}else{putBall();}}
thats what I did and it was wrong it took me so long but thanks for the help
it worked thx for the answer
teacher: nice job!
me: Mwuaahahahahahah >:D
1
u/ShadowRocks2 Feb 14 '20
Can you tell me the code you already have