목차
1. 디자인 & 속성설정
2. Coding
3. 실행
2. Coding
3. 실행
본문내용
ext:='비겼다.';
end;
if (m=0) and (s=1) then
begin
edit1.Text:='졌다.';
edit2.Text:='이겼다.';
end;
if (m=0) and (s=2) then
begin
edit1.Text:='이겼다.';
edit2.Text:='졌다.';
end
end;
begin
if (m=1) and (s=1) then
begin
edit1.text:='비겼다.';
edit2.Text:='비겼다.';
end;
if (m=1) and (s=2) then
begin
edit1.Text:='졌다.';
edit2.Text:='이겼다.';
end;
if (m=1) and (s=0) then
begin
edit1.Text:='이겼다.';
edit2.Text:='졌다.';
end;
end;
begin
if (m=2) and (s=2) then
begin
edit1.text:='비겼다.';
edit2.Text:='비겼다.';
end;
if (m=2) and (s=0) then
begin
edit1.Text:='졌다.';
edit2.Text:='이겼다.';
end;
if (m=2) and (s=1) then
begin
edit1.Text:='이겼다.';
edit2.Text:='졌다.';
end;
end;
end;
end;
end;
end.
3. 실행
가위 바위 보 중에 하나를 Player 가 선택을 한다.
그리고 시작 버튼을 누르면 Player 는 선택한 가위 바위 보 중에 하나가
나오고 Com 은 랜덤으로 가위 바위 보 가 나온다.
그래서 결과로 이기고 지고 비기는 것을 보여준다.
end;
if (m=0) and (s=1) then
begin
edit1.Text:='졌다.';
edit2.Text:='이겼다.';
end;
if (m=0) and (s=2) then
begin
edit1.Text:='이겼다.';
edit2.Text:='졌다.';
end
end;
begin
if (m=1) and (s=1) then
begin
edit1.text:='비겼다.';
edit2.Text:='비겼다.';
end;
if (m=1) and (s=2) then
begin
edit1.Text:='졌다.';
edit2.Text:='이겼다.';
end;
if (m=1) and (s=0) then
begin
edit1.Text:='이겼다.';
edit2.Text:='졌다.';
end;
end;
begin
if (m=2) and (s=2) then
begin
edit1.text:='비겼다.';
edit2.Text:='비겼다.';
end;
if (m=2) and (s=0) then
begin
edit1.Text:='졌다.';
edit2.Text:='이겼다.';
end;
if (m=2) and (s=1) then
begin
edit1.Text:='이겼다.';
edit2.Text:='졌다.';
end;
end;
end;
end;
end;
end.
3. 실행
가위 바위 보 중에 하나를 Player 가 선택을 한다.
그리고 시작 버튼을 누르면 Player 는 선택한 가위 바위 보 중에 하나가
나오고 Com 은 랜덤으로 가위 바위 보 가 나온다.
그래서 결과로 이기고 지고 비기는 것을 보여준다.
추천자료
VPI아동의 관찰보고서 사례
아동 미술 활동 지도법 조사
시각장애인 게이트볼
[과외]중학 국어 2-2학기 기말 예상문제 07
올림픽 높이뛰기 역사
육상레포트 필드
테니스에 대하여
육상에 대하여
수학학습지도 본시 미지수가 2개인 일차방정식
게임이론 분석 자료
CGI(공통게이트웨이인터페이스)의 개념과 특징, CGI(공통게이트웨이인터페이스)의 동작원리와...
글을 쓰기 위해 우리에게 필요한 자세 - 호기심, 움직임, 3의 힘을 활용하라, 틈을 경영하라,...
[동시게임 (simultaneous-move game)] 동시게임의 의의와 구조, 동시게임의 균형(내쉬균형)
만4세 2학기 보육일지입니다. 평가인증 통과한 공공형 어린이집 교사입니다.