# if 文
if ( 条件 ) {
条件がOKの場合はここの処理を通る
}
条件がOK-> true / 条件がNG -> false
例:
---------------------
x = 5;
if ( x == 5) {
x = x – 3;
}
-------------------
x = 5;
if ( x < 0) {
x = x + 3;
}
#step_06.html
Slide 32
Slide 32 text
(x,y)
(x)
(0,0)
(y)
#step_06.html
Slide 33
Slide 33 text
(x-3,y)
(x-3)
(0,0)
(y)
#step_06.html
Slide 34
Slide 34 text
(x-3,y)
(x-3)
(0,0)
(y)
#step_06.html
Slide 35
Slide 35 text
(0,y)
(0,0)
(y)
if ( x == 0 ) {
xを元の位置に戻す数字を入れる
壁の高さを変える
}
#step_06.html