CointToss With Buttons Remix On Scratch PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

change 

volume by -10
CointToss with buttons re…
File Edit Tutorials See Project Page Join Scratch Sign in
by SalamEjailat
set volume to 100 %

Code Costumes Sounds


volume set Turns to 0

set RandomValue to 0
Motion
Events
set UserChoice to  

Looks
when clicked set UserWins to 0

say Hi - Welcome to the coin toss game! for 2 seconds


Sound

when space key pressed say I will toss a coin 3 times. for 2 seconds

Events
say Each time you get to choose heads or tails. for 2
when this sprite clicked
Control
say Best out of three wins! for 2 seconds

say Let's get going....click on me to start! for 2 seconds


when backdrop switches to background1
Sensing
stop this script

Operators
when loudness > 10 Stage
Sprite ROTFL x 14 y 0
when this sprite clicked
Variables
repeat until Turns = 3 Size 100 Direction -270

when I receive flip
My Blocks
change Turns by 1 Backdrops

say For this toss do you want heads or tails? for 2 seconds 1


broadcast flip
ROTFL hand Heads Tails
say Click on the coin of your choice! for 2 seconds
broadcast flip and wait
hide

set ChoiceMade to false


Control
broadcast usermustchoose and wait
wait 1 seconds
show

if UserChoice = heads then


repeat 10

say OK... You chose Heads... Now I will toss the coin.... for

else

forever say OK... You chose Tails... Now I will toss the coin.... for

hide

You might also like