when I receive [domovex]
change x by (movex)
if <touching color [#0000ff] ?> then
change x by ((0) - (movex))
end
broadcast [checkwin v] and wait
when I receive [domovey]
change y by (movey)
if <touching color [#0000ff] ?> then
change x by ((0) - (movey))
end
broadcast [checkwin v] and wait
when I receive [checkwin]
if <touching color [#ff0000] ?> then
say [You win!] for (5) seconds
set x to (0)
set y to (-160)
end
when flag clicked
set x to (0)
set y to (-160)
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse
Captions
The code blocks for detecting a win in the Scratch maze game.