일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 프로그래머스 문제 풀이
- 플레이그라운드 문제풀이
- 플레이그라운드
- 42에꼴
- 값올리기
- binary operator
- 짝수와 홀수
- 스위프트
- 두 정수 사이의 합
- ios
- 추적하기
- c언어
- 이노베이션아카데미
- 라피신
- ios개발자
- Swift
- 42ecole
- 맥
- 프로그래머스
- html
- playgrounds
- ternary operator
- 스위프트공부
- ==
- unary operator
- swiftlanguage
- ===
- string from
- !==
- string(from)
Archives
- Today
- Total
minError
PlayGrounds [ 총 개수 모으기 ] 본문
let totalGems = randomNumberOfGems
var gemCounter = 0
while gemCounter < totalGems {
while !isBlocked {
if is OnGem {
collectGem()
gemCounter += 1
}
moveForward()
}
if isBlocked && isBlockedLeft {
turnRingt()
}
else if isBlocked && isBlockedRight {
turnLeft()
}
}
'PlayGround > 코딩배우기 2' 카테고리의 다른 글
PlayGrounds [ 포털 켜기 및 끄기 ] (1) | 2020.03.04 |
---|---|
PlayGrounds [ 포털 비활성화 하기 ] (0) | 2020.03.04 |
PlayGrounds [ 스위치 모으기 ] (3) | 2020.02.27 |
PlayGrounds [ 동일한 값 확인하기 ] (0) | 2020.02.27 |
PlayGrounds [ 3개의 보석, 4개의 스위치 ] (0) | 2020.02.27 |
Comments