File:Cjam-maze-detecting-a-win.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(2,746 × 2,661 pixels, file size: 423 KB, MIME type: image/png)

Captions

Captions

The code blocks for detecting a win in the Scratch maze game.

Summary

[edit]
Description
English: The code blocks for detecting a win in the Scratch maze game.
Date
Source Andy Oakley
Author http://cotswoldjam.org/downloads/2016-04/cjam-scratch-maze.pdf

scratchblocks source code:

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)

Licensing

[edit]
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
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.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current22:43, 8 October 2023Thumbnail for version as of 22:43, 8 October 20232,746 × 2,661 (423 KB)SergioFLS (talk | contribs)recreate with scratchblocks
23:24, 28 January 2023Thumbnail for version as of 23:24, 28 January 2023388 × 301 (41 KB)Inferno986return (talk | contribs)Uploaded a work by http://cotswoldjam.org/downloads/2016-04/cjam-scratch-maze.pdf from Andy Oakley with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata