I'm a big fan of the defunct game Trainyard -- https://trainyard.ca -- it's no longer available. I'd like to create a similar game as a single page app: 1. a grid -- trainyard is always 7x7, I'd like to support anything from 5x5 up to 9x13 2. Instead of trains, I'd like to use packets of light -- otherwise functioning mostly the same as the trains, occupying one square and moving across the grid one square per tick 3. There needs to be a slider to control how many ticks go by in a second, from 0 (nothing moves) up to 30 (super fast) 4. There needs to be a counter of how many ticks have gone by 5. The packets have a color that can be red, green, blue, cyan, magenta, yellow, or white 6. Packets that cross blend their colors: red + blue become magenta, green + red become yellow, green + blue become cyan. cyan + red, yellow + blue, magenta + green all become white. cyan, magenta, and yellow + any of their already constituent colors stay as they are; the other color becomes them -- so if magenta crosses red, the magenta packet will stay magenta, while the red packet will become magenta. 7. Emitters that show packet color they will emit, up to nine packets, in a clocked way, one per tick. Emitters can be set to emit in multiple directions, in which case they start from the first available of NESW, and proceed clockwise. Any packet hitting an emitter is blocked and goes away. 8. Receivers that show the packet colors they need, in order, up to nine packets. receivers can be marked to receive or not from any direction, or multiple directions (up to all four directions are possible). Any packet that hits a receiver from a direction it is not set to receive from is blocked and goes away. 9. There should be elements the user can add to board: 10. Diagonal mirrors, both NE/SW or NW/SE. Packets hitting these reflect at 90 degrees, so a packet traveling north hitting a NE/SW mirror will switch to travel east. If the mirror were NW/SE the packet would switch to travel west 11. A diagonal mirror can optionally be set to switch, meaning that each tick where a packet(s) hit(s) the mirror, it switches from NE/SW to NW/SE, and vice versa. 12. straight mirrors, NS or EW. packets hitting these mirrors reflect back to the opposite direction if they are traveling perpendicularly, and are unaffected if they are traveling in parallel. This means a packet traveling west hitting a vertical mirror will reflect back east, and a packet traveling east will reflect back west, while a north or south traveling packet will be unaffected. 13. A straight mirror can optionally be set to switch, meaning that each tick where a packet(s) hit(s) the mirror, it switches from N/S to E/W, and vice versa. 14. A crystal block -- which slows all packets that hit it so they emerge one tick later than they would if the block weren't there. So for example if two packets are vertically aligned traveling east and one of them hits a crystal block, it will spend an extra tick transiting the block, so after it emerges it will be one square behind the packet that didn't transit a block. 15. A block of wood -- all packets hitting a block of wood are absorbed. A block of wood has a setting from 1-99 (defaults to 99) for how many packets of light it will absorb before disintegrating. So if a block is set to 3 then when (if) the third packet of light hits it, the block will immediately disintegrate, and if a fourth packet hits that grid spot the very next tick the block will be gone and it will be unaffected. 16. Prisms, which look like a triangle with its base facing north, south, east or west. Suppose there is a prism with its base facing east. Then: 1. if a red, green, blue, or white packet hits the prism from the east, it will result in two packets of that color going north and south. 2. If a cyan, magenta, or yellow packet hits the prism from the east, it will result in split colors north and south: cyan = a green packet going north, and blue going south: magenta = blue north and red south; and yellow = red north and green south. 3. if a red packet and blue packet hit from north and south in any combination, one magenta packet will emerge going east; likewise for other pairs. 4. If two of the same color hit from north and south, one packet of that color will emerge going east. 5. If cyan, magenta, or yellow and one of their component colors hit from north and south, one packet of that color will emerge going east. So for example, if yellow hits going north and red going south, then yellow will emerge going east. 6. If cyan, magenta, or yellow and the third color hit from north and south, one packet of white will emerge going east. so if yellow hits going north and blue going south, white would emerge going east. 7. If white and any color hit going north and south, then white will emerge going east. 8. a single light packet hitting from the north, south, or west will pass through, emerging heading east unchanged 9. likewise, a packet hitting from the west can substitute for the north or south packet in any of the above scenarios. 10. If three packets hit at the same time from the north, south, and west, extend the above logic. So for example if magenta hits going south and north, and red from the west, then one magenta packet will emerge to the east. If red, green, and blue hit from the north, south, and west, then white will emerge to the east. 11. if a packet hits from the east as well as from north south or west, then it will cross the other packets as appropriate to the end of the path: if red hits from the south and magenta hits from the east, the magenta splits into blue north and red south, and the result is red to the south, red to the east, and blue to the north; if red hits from the east and magenta from the north, the red will split to go north and south, resulting in magenta emerging to north and east, and red to the south. 17. prisms can be set to flip whenever light packets hit them, east for west, north for south; or to rotate clockwise by 90 degrees or counter-clockwise. 18. the game should support a set of puzzles, with the user able to choose a puzzle to load up to try. 19. With a puzzle open, a user should be able to add any elements to the board and configure them to try to solve the puzzle. 20. The user should be able to store multiple in-progress and completed solutions, among the puzzles, and for a single puzzle. The user should be able to clone a solution to make a copy to change. 21. The user should be able to run a solution, adjusting the speed of playback with the slider. emitters should emit their packets, one per tick. receivers should mark off the packets they receive if they are correct, or adding an international no symbol if they receive the wrong packet, and marking no more off. 22. Having run a solution the user should be able to reset that run, going back to edit mode to change things or start the run again. 23. When a run solves the puzzle, that solution should be locked. The game should record the time the user took to solve, the number of elements they use in their solution, and the number of ticks the solution takes to solve. The user can still clone or delete that solution. 24. There should be a puzzle solve mode, where the user selects puzzles from the list to try to solve as described above. 25. There should be a puzzle create mode, where the user selects puzzles to edit the configuration of, and can duplicate puzzles. The user should be able to specify the size of the board, the emitters, the receivers, and their configurations, and blocks of wood and their configurations. I think that's everything, but if I've missed anything, feel free to ask.