direction_is_south()
(방향)
direction_is_south() - 로봇이 남쪽 방향인지 확인하기
사용설명
bool direction_is_south ( void )
로봇이 남쪽 방향을 바라보고 있는지 알아내는 명령어이다.
남쪽을 바라보고 있으면 true, 그렇지 않으면 false를 얻는다.
매개변수
없음(void)
direction_is_south()는 매개변수를 사용하지 않음
반환값
bool
true 또는 false
사용예

코드실행
// 새로운 명령어를 만드는 공간
function direction() {
     a=direction_is_south()
     if (a==true) {
           say("남쪽을 바라보고 있어요.")
     } else {
           say("남쪽이 아닙니다.")
     }
}

// 명령어를 실행하는 공간
hide_object_count()
direction()
turn_left()
direction()
관련함수
get_direction()로봇의 방향 알아내기
direction_is_east()로봇이 동쪽 방향인지 확인하기
direction_is_north()로봇이 북쪽 방향인지 확인하기
direction_is_west()로봇이 서쪽 방향인지 확인하기
PB 광고입니다   : )