title Enqueue
author Allen Webster
homepage www.pushthegame.com

norepeat_action
run_rules_on_level_start

========
OBJECTS
========

Background .
BLACK

Wall #
DARKGRAY
00.00
0.0.0
.000.
0.0.0
00.00

Player S
TRANSPARENT

Selector
WHITE
00.00
0...0
.....
0...0
00.00

RedBlock R
#990000

BlueBlock B
#000099

GreenBlock G
#009900

YellowBlock Y
#888800

PurpleBlock P
#660066

OrangeBlock O
#994400

PinkBlock I
PINK

BrownBlock W
#222200

RedPad
#990000
.....
..0..
.000.
..0..
.....

BluePad 
#000099
.....
..0..
.000.
..0..
.....

GreenPad
#009900
.....
..0..
.000.
..0..
.....

YellowPad
#888800
.....
..0..
.000.
..0..
.....

PurplePad
#660066
.....
..0..
.000.
..0..
.....

OrangePad
#994400
.....
..0..
.000.
..0..
.....

PinkPad
PINK
.....
..0..
.000.
..0..
.....

BrownPad
#222200
.....
..0..
.000.
..0..
.....

QueueLocation
TRANSPARENT

QueueHead
TRANSPARENT

EnqueueHead
TRANSPARENT

Taker
TRANSPARENT

Filler
TRANSPARENT

WaitingFiller
TRANSPARENT

FillerTakerLocation
TRANSPARENT

ModeGen
TRANSPARENT

WaitingGen
TRANSPARENT

SendMode
TRANSPARENT

SendModePerm
TRANSPARENT

ReceiveMode
TRANSPARENT

ReceiveModePerm
TRANSPARENT

=======
LEGEND
=======

@ = Wall and Player and QueueLocation
H = Wall and QueueLocation
x = SendMode and Wall
z = ReceiveMode and ModeGen and Wall
? = WaitingGen and Wall
+ = SendModePerm
- = ReceiveModePerm

Block = RedBlock or BlueBlock or GreenBlock or YellowBlock or OrangeBlock or PurpleBlock or PinkBlock or BrownBlock
Pad = RedPad or BluePad or GreenPad or YellowPad or OrangePad or PurplePad or PinkPad or BrownPad
Head = QueueHead or EnqueueHead

F = Filler and Wall
! = Taker and Wall
a = Filler and FillerTakerLocation and Wall

[ = RedPad
{ = BluePad
] = GreenPad
} = YellowPad
: = PurplePad
; = OrangePad
' = PinkPad
" = BrownPad

=======
SOUNDS
=======

================
COLLISIONLAYERS
================

Background
QueueHead
EnqueueHead
QueueLocation
Wall
RedBlock, BlueBlock, GreenBlock, YellowBlock, PurpleBlock, OrangeBlock, PinkBlock, BrownBlock
RedPad, BluePad, GreenPad, YellowPad, PurplePad, OrangePad, PinkPad, BrownPad
Selector
Filler
WaitingFiller
Taker
FillerTakerLocation
ModeGen
WaitingGen
SendMode
ReceiveMode
SendModePerm
ReceiveModePerm
Player

======  
RULES   
======  

vertical [ > Player ] -> [ Player ]
[ > Player | ... | Head ] -> [ | ... | Player Head ]
[ > Player | ... | No Head ] -> [ Player | ... | ]

[SendModePerm][ action Player ][ Selector Block ][ Filler ] -> [SendModePerm][ action Player ][ Wall Selector ][ RIGHT Filler Block ]

[ReceiveModePerm][ action Player ][ Selector ][ Taker Block ] -> [ReceiveModePerm][ action Player ][ Selector Block ][ RIGHT Taker Wall ]

(kill pads)
[RedBlock RedPad] -> [RedBlock]
[BlueBlock BluePad] -> [BlueBlock]
[GreenBlock GreenPad] -> [GreenBlock]
[YellowBlock YellowPad] -> [YellowBlock]
[PurpleBlock PurplePad] -> [PurpleBlock]
[OrangeBlock OrangePad] -> [OrangeBlock]
[PinkBlock PinkPad] -> [PinkBlock]
[BrownBlock BrownPad] -> [BrownBlock]

(queue locations generating appropriate management types)
horizontal [QueueLocation | ... | SendMode] -> [QueueLocation QueueHead | ... | SendMode]
[SendMode][Player No Head][QueueLocation] -> [SendMode][][QueueLocation Player]
[SendMode] [ReceiveModePerm] -> [] [SendModePerm]
[SendMode] -> []

horizontal [QueueLocation | ... | ReceiveMode] -> [QueueLocation EnqueueHead | ... | ReceiveMode]
[ReceiveMode][Player No Head][QueueLocation] -> [ReceiveMode][][QueueLocation Player]
[ReceiveMode] [SendModePerm] -> [] [ReceiveModePerm]
[ReceiveMode] -> []

(moving the player, queuehead and selector upon an action)
[ action Player Head ] -> [ RIGHT Player RIGHT Head ]
late down [ QueueHead | No Block ] -> [ | ]
late down [ EnqueueHead | Wall ] -> [ | Wall ]
late horizontal [ Player No Head | ... | Head ] -> [ | ... | Player Head ]

(selector always goes with player)
late down [ Player | No Selector ] -> [ Player | Selector ]
late down [ No Player | Selector ] -> [ | ]
late [Selector Wall] -> [Wall]

(fix filler/taker advance mode hack)
late up [ Filler Wall | No Wall ] -> [ Wall | Filler ]
late down [ Filler | ... | Filler ] -> [ Filler | ... | WaitingFiller ]
late up [ Taker Wall | No Taker ] -> [ Wall | Taker ]

(killing the filler/taker when it is finished)
late [ Taker No Block ][ModeGen] -> [][SendMode] again
late up [ Filler Wall | Wall ][WaitingGen] up [FillerTakerLocation | Block ][WaitingFiller] -> [ Wall | Wall ][ModeGen ReceiveMode][ | Block Taker][Filler] again

==============
WINCONDITIONS
==============

No Pad

=======     
LEVELS
=======

(level 1)
#@###H#x
#RR##BB#
########
+.......
########
##{[{[##
##F#####

(level 2)
#@###H#x
#RB##GR#
########
+.......
########
##[]{[##
##F#####

Message The problem grows

(level 3)
########
##RBRB##
##!#####
-.......
#@###H#z
#..##..#
########
........
########
##{[{[##
##F#####

(level 4)
########
##RGBY##
##!#####
-.......
#@###H#z
#..##..#
########
........
########
##][}{##
##F#####

(level 5)
##########
##RGRROR##
##!#######
-.........
#@####H##z
#...##...#
##########
..........
##########
##[;[[][##
##F#######

(level 6)
##########
##RRGORR##
##!#######
-.........
#@####H##z
#...##...#
##########
..........
##########
##[;[[][##
##F#######

Message Mind the subsequences

(level 7)
##########
##RGBYOP##
##!#######
-.........
#@####H##z
#...##...#
##########
..........
##########
##[;]{}:##
##F#######

(level 8)
##########
##RGBYOP##
##!#######
-.........
#@####H##z
#...##...#
##########
..........
##########
##[];:{}##
##F#######

Message One shall not be enough

(level 9)
############
##RGGBBYYR##
##!#########
-...........
#@#####H###z
#....##....#
############
............
############
##........##
##a#########
............
#H#####H###?
#....##....#
############
............
############
##]][[}}{{##
##F#########
 
(level 10)
############
##RRGGBBYY##
##!#########
-...........
#@#####H###z
#....##....#
############
............
############
##........##
##a#########
............
#H#####H###?
#....##....#
############
............
############
##[}[}]{]{##
##F#########

(level 11)
############
##GRRRRRRB##
##!#########
-...........
#@#####H###z
#....##....#
############
............
############
##........##
##a#########
............
#H#####H###?
#....##....#
############
............
############
##{[[[[[[]##
##F#########

(level 13)
############
##RGBYOPIW##
##!#########
-...........
#@#####H###z
#....##....#
############
............
############
##........##
##a#########
............
#H#####H###?
#....##....#
############
............
############
##";:']{}[##
##F#########

(level 14)
############
##RGBYOPIW##
##!#########
-...........
#@#####H###z
#....##....#
############
............
############
##........##
##a#########
............
#H#####H###?
#....##....#
############
............
############
##"]{};:'[##
##F#########

(level 15)
############
##RGBYOPIW##
##!#########
-...........
#@#####H###z
#....##....#
############
............
############
##........##
##a#########
............
#H#####H###?
#....##....#
############
............
############
##";:]'{}[##
##F#########

Message Thanks for playing!