Created
June 22, 2020 18:54
-
-
Save pancelor/ef9e6a71c4c7e1573534e980c9b28484 to your computer and use it in GitHub Desktop.
Sock Matching Test (PuzzleScript Script)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title Sock Matching Test | |
author pancelor | |
homepage www.twitter.com/pancelor | |
again_interval 0.05 | |
run_rules_on_level_start | |
(verbose_logging) | |
======== | |
OBJECTS | |
======== | |
Background | |
LIGHTGREEN GREEN | |
11111 | |
01111 | |
11101 | |
11111 | |
10111 | |
UnmatchedSock | |
black yellow grey red | |
.11.. | |
.33.. | |
.00.. | |
.000. | |
..00. | |
MatchedSock | |
black purple grey blue | |
.11.. | |
.33.. | |
.00.. | |
.000. | |
..00. | |
mNoWallR | |
yellow | |
mNoWallL | |
yellow | |
mNoWallU | |
yellow | |
mNoWallD | |
yellow | |
Wall | |
BROWN DARKBROWN | |
00010 | |
11111 | |
01000 | |
11111 | |
00010 | |
Player | |
Black Orange White Blue | |
.000. | |
.111. | |
22222 | |
.333. | |
.3.3. | |
Crate | |
Orange Yellow | |
00000 | |
0...0 | |
0...0 | |
0...0 | |
00000 | |
======= | |
LEGEND | |
======= | |
. = Background | |
# = Wall | |
P = Player | |
c = Crate | |
s = UnmatchedSock | |
cPushable = UnmatchedSock or Crate or Player | |
cSock = UnmatchedSock or MatchedSock | |
cNoWall = mNoWallL or mNoWallR or mNoWallU or mNoWallD | |
cSockTestBlocker = Wall or Crate or Player or cSock | |
cSockTestSource = UnmatchedSock | |
======= | |
SOUNDS | |
======= | |
Crate MOVE 36772507 | |
================ | |
COLLISIONLAYERS | |
================ | |
Background | |
Player, Wall, Crate, cSock | |
cNoWall | |
====== | |
RULES | |
====== | |
[ > cPushable | cPushable ] -> [ > cPushable | > cPushable ] | |
( | |
shoot out NoWall marks from each sock; when they hit an unmatched sock it becomes matched | |
the 'again's let back-propagation happen | |
(only necessary for two cases b/c of the rule order, but it doesnt hurt to put it on all 4) | |
) | |
(Left) | |
late Left [cSockTestSource] -> [cSockTestSource mNoWallL] | |
late Left [mNoWallL | no cSockTestBlocker] -> [ | mNoWallL] | |
late Left [mNoWallL | UnmatchedSock] -> [ | mNoWallR MatchedSock] again | |
(Right) | |
late Right [cSockTestSource] -> [cSockTestSource mNoWallR] | |
late Right [mNoWallR | no cSockTestBlocker] -> [ | mNoWallR] | |
late Right [mNoWallR | UnmatchedSock] -> [ | mNoWallL MatchedSock] again | |
(Up) | |
late Up [cSockTestSource] -> [cSockTestSource mNoWallU] | |
late Up [mNoWallU | no cSockTestBlocker] -> [ | mNoWallU] | |
late Up [mNoWallU | UnmatchedSock] -> [ | mNoWallD MatchedSock] again | |
(Down) | |
late Down [cSockTestSource] -> [cSockTestSource mNoWallD] | |
late Down [mNoWallD | no cSockTestBlocker] -> [ | mNoWallD] | |
late Down [mNoWallD | UnmatchedSock] -> [ | mNoWallU MatchedSock] again | |
late [cNoWall] -> [] | |
============== | |
WINCONDITIONS | |
============== | |
no UnmatchedSock | |
======= | |
LEVELS | |
======= | |
################## | |
#........#.......# | |
#.....P....s..s..# | |
#...s............# | |
#....c...#.......# | |
#.s..#...#...c.### | |
#.....s..#.s...#s# | |
#........#.....#s# | |
################## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment