support multiple stages for each level, resetting the machine between

This commit is contained in:
Crispy 2024-12-18 21:31:05 +01:00
parent e6437ae9cf
commit 43130b665d
17 changed files with 220 additions and 126 deletions

View file

@ -4,6 +4,12 @@
"name": "Zero",
"description": "learn how to output data",
"init_board": "\n o \n\n I\n\n",
"inputs": [],
"outputs": [0]
"stages": [
{
"input": [],
"output": [
0
]
}
]
}

View file

@ -3,7 +3,8 @@
"sort_order": 12,
"name": "Digits",
"description": "place digits and use number keys to assign them values",
"init_board": null,
"inputs": [],
"outputs": [4, 8, 16]
"stages": [{
"input": [],
"output": [4, 8, 16]
}]
}

View file

@ -4,6 +4,8 @@
"name": "Loop",
"description": "repeated output",
"init_board": "\n \n o\n\n\n\n ^ \n\n",
"inputs": [],
"outputs": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
"stages": [{
"input": [],
"output": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
}]
}

View file

@ -3,7 +3,8 @@
"sort_order": 14,
"name": "Copy Cat",
"description": "read input and output the same thing",
"init_board": null,
"inputs": "Hello, world!",
"outputs": "Hello, world!"
"stages": [{
"input": "Hello, world!",
"output": "Hello, world!"
}]
}

View file

@ -3,7 +3,8 @@
"sort_order": 15,
"name": "Odd Cat",
"description": "copy only the odd numbers from the input",
"init_board": null,
"inputs": [112, 92, 51, 79, 112, 96, 84, 59, 195, 208, 137, 196, 68, 204, 82, 148, 251, 56, 105, 38, 63, 204, 240, 220, 180, 54, 211, 17, 82, 17, 181, 43],
"outputs": [51, 79, 59, 195, 137, 251, 105, 63, 211, 17, 17, 181, 43]
"stages": [{
"input": [112, 92, 51, 79, 112, 96, 84, 59, 195, 208, 137, 196, 68, 204, 82, 148, 251, 56, 105, 38, 63, 204, 240, 220, 180, 54, 211, 17, 82, 17, 181, 43],
"output": [51, 79, 59, 195, 137, 251, 105, 63, 211, 17, 17, 181, 43]
}]
}

View file

@ -3,7 +3,8 @@
"sort_order": 23,
"name": "Fives",
"description": "count how many fives are in the input",
"init_board": null,
"inputs": [182, 236, 71, 5, 5, 242, 29, 99, 19, 230, 217, 5, 67, 5, 223, 224, 70, 243, 3, 74, 242, 5, 171, 31, 96, 5, 169, 70, 5, 163, 72, 5, 172, 148, 5, 208, 28, 220, 17, 184, 172, 238, 5, 105, 119, 5, 106, 100, 73, 53, 42, 221, 155, 5, 74, 100, 161, 36, 16, 239, 193, 164, 64, 162, 222, 155, 107, 14, 45, 52, 159, 31, 199, 124, 129, 0],
"outputs": [12]
"stages": [{
"input": [182, 236, 71, 5, 5, 242, 29, 99, 19, 230, 217, 5, 67, 5, 223, 224, 70, 243, 3, 74, 242, 5, 171, 31, 96, 5, 169, 70, 5, 163, 72, 5, 172, 148, 5, 208, 28, 220, 17, 184, 172, 238, 5, 105, 119, 5, 106, 100, 73, 53, 42, 221, 155, 5, 74, 100, 161, 36, 16, 239, 193, 164, 64, 162, 222, 155, 107, 14, 45, 52, 159, 31, 199, 124, 129, 0],
"output": [12]
}]
}

View file

@ -3,7 +3,8 @@
"sort_order": 22,
"name": "Length",
"description": "count how many numbers are in the input, until the first zero",
"init_board": null,
"inputs": [182, 236, 71, 5, 5, 242, 29, 99, 19, 230, 217, 5, 67, 5, 223, 224, 70, 243, 3, 74, 242, 5, 171, 31, 96, 5, 169, 70, 5, 163, 72, 5, 172, 148, 5, 208, 28, 220, 17, 184, 172, 0],
"outputs": [41]
"stages": [{
"input": [182, 236, 71, 5, 5, 242, 29, 99, 19, 230, 217, 5, 67, 5, 223, 224, 70, 243, 3, 74, 242, 5, 171, 31, 96, 5, 169, 70, 5, 163, 72, 5, 172, 148, 5, 208, 28, 220, 17, 184, 172, 0],
"output": [41]
}]
}

View file

@ -3,7 +3,8 @@
"sort_order": 21,
"name": "Null Separation",
"description": "output everything after the first zero in the input data",
"init_board": null,
"inputs": "9834726\u0000Hello, worlg!",
"outputs": "Hello, worlg!"
"stages": [{
"input": "9834726\u0000Hello, worlg!",
"output": "Hello, worlg!"
}]
}

View file

@ -3,7 +3,8 @@
"sort_order": 24,
"name": "Reverse",
"description": "read input until zero and output the same thing in reverse",
"init_board": null,
"inputs": "tnropmi yrev\u0000",
"outputs": "very impornt"
"stages": [{
"input": "tnropmi yrev\u0000",
"output": "very impornt"
}]
}

View file

@ -3,7 +3,8 @@
"sort_order": 35,
"name": "Lowercase",
"description": "Convert text to lowercase",
"init_board": null,
"inputs": "I CraVeD tHE strEnGTH AND CerTAinTy oF STeeL",
"outputs": "i craved the strength and certainty of steel"
"stages": [{
"input": "I CraVeD tHE strEnGTH AND CerTAinTy oF STeeL",
"output": "i craved the strength and certainty of steel"
}]
}

View file

@ -3,7 +3,8 @@
"sort_order": 31,
"name": "Numbers",
"description": "Convert input numbers to text, separated by spaces (32)\n'0' = 48, '1' = 49, '2' = 50, and so on",
"init_board": null,
"inputs": [85, 114, 32, 103, 97, 121, 58, 51],
"outputs": "85 114 32 103 97 121 58 51"
"stages": [{
"input": [85, 114, 32, 103, 97, 121, 58, 51],
"output": "85 114 32 103 97 121 58 51"
}]
}

View file

@ -3,7 +3,8 @@
"sort_order": 33,
"name": "Numbers 2",
"description": "Convert input numbers from text, separated by spaces (32)\n'0' = 48, '1' = 49, '2' = 50, and so on",
"init_board": null,
"inputs": "85 114 32 103 97 121 58 51",
"outputs": [85, 114, 32, 103, 97, 121, 58, 51]
"stages": [{
"input": "85 114 32 103 97 121 58 51",
"output": [85, 114, 32, 103, 97, 121, 58, 51]
}]
}

View file

@ -2,9 +2,5 @@
"id": "sandbox",
"sort_order": 100000,
"name": "Sandbox",
"description": "make whatever you want here",
"is_sandbox": true,
"init_board": null,
"inputs": "",
"outputs": []
"description": "make whatever you want here"
}