'코드'
반복 패턴의 함수를 정의해 보세요.
func [반복 사용 가능한 명칭을 입력해주세요] () {
[ ]
}
[ ]
[ ]
func [go]() {
turnLeft()
}
moveForward()
collectGem()
moveForward()
toggleSwitch()
moveForward()
go()
moveForward()
collectGem()
moveForward()
toggleSwitch()
moveForward()
collectGem()
moveForward()
collectGem()
go()
moveForward()
collectGem()
moveForward()
toggleSwitch()
moveForward()
go()
moveForward()
collectGem()
moveForward()
toggleSwitch()
'Playgrounds'플레이그라운드'' 카테고리의 다른 글
Playgrounds '플레이그라운드' 17. (0) | 2024.06.12 |
---|---|
Playgrounds '플레이그라운드' 16. (0) | 2024.05.24 |
Playgrounds '플레이그라운드' 14. (0) | 2024.05.21 |
Playgrounds '플레이그라운드' 13. (0) | 2024.05.20 |
Playgrounds '플레이그라운드' 12. (0) | 2024.05.20 |