スクラッチでジャンケンゲームを
まず、ジャンケンゲームのロジックを
![](https://digilab.tech/materials/wp-content/uploads/2018/06/SCRATCH_A02-ロジック.gif)
スクラッチはスプライト
1.スプライト、
スプライトを
![](https://digilab.tech/materials/wp-content/uploads/2018/06/スクリーンショット-2018-02-13-15.58.00.png)
デジラボの
![](https://digilab.tech/materials/wp-content/uploads/2018/06/スクリーンショット-2018-02-13-16.06.44.png)
![](https://digilab.tech/materials/wp-content/uploads/2018/02/77d3f4d1c30d70f7271d3b28f0f6a1fa.png)
![](https://digilab.tech/materials/wp-content/uploads/2018/06/スクリーンショット-2018-02-13-16.05.39.png)
![](https://digilab.tech/materials/wp-content/uploads/2018/06/スクリーンショット-2018-02-13-16.06.32.png)
![](https://digilab.tech/materials/wp-content/uploads/2018/06/スクリーンショット-2018-02-16-14.45.02.png)
2.プログラミングのヒント
ボタン
1. ボタンが
2.ボタンが
3.
4.その
![](https://digilab.tech/materials/wp-content/uploads/2018/06/ヒント用ボタンスプライト側.png)
各「手画像」側のプログラムのヒント
— 「じゃんけん初期化」メッセージを受け取った時
1.ボタンスプラウトからボタンが押されたことをメッセージで受け取る。 ※「ジャンケン初期化」メッセージで受け取る
2.「手画像」を表示させない
—「じゃんけん結果」を受け取った時
1.じゃんけんの手を記録する変数(じゃんけん変数)が自分の番号(グー=1、パー=2、チョキ=3)といっしょか比較する
2.いっしょなら自分を表示(手画像)する
![](https://digilab.tech/materials/wp-content/uploads/2018/06/ヒント用手スプライト側.png)
答え
ボタンスプライトのプログラム
![](https://digilab.tech/materials/wp-content/uploads/2018/06/スクリーンショット-2018-02-13-16.24.13.png)
じゃんけんの「手」スプライトのプログラム
「グー」スプライト
![](https://digilab.tech/materials/wp-content/uploads/2018/06/スクリーンショット-2018-02-13-16.24.41.png)
「パー」スプライト
![](https://digilab.tech/materials/wp-content/uploads/2018/06/スクリーンショット-2018-02-13-16.24.30.png)
「チョキ」スプライト
![](https://digilab.tech/materials/wp-content/uploads/2018/06/スクリーンショット-2018-02-13-16.24.22.png)