Learned about loops, if and else statements. Have written
around 100 lines of code so far and completed puzzles 2 – 20. This was the last
lines of code I wrote today.
while (notFinished()) {
if (isPathForward()) {
moveForward();
} else {
if (isPathRight()) {
turnRight();
} else {
turnLeft();
}
}
}
No comments:
Post a Comment