This file contains hidden or 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
// {"enableUpdate":true,"enableVisualMode":true,"enableClearOnUpdate":true,"updateFrequency":10,"gridWidth":10,"gridHeight":20,"throne-playground-script":"0.1.0"} | |
// initialize state | |
fall-timer 5 . default-fall-timer 5 . block-id 0 . falling-shape-id 0 . max-width 10 . max-height 20 | |
// spawn a shape that will fall, if one doesn't already exist | |
#update . !shape _X _Y _BLOCKS . falling-shape-id ID . + ID 1 ID' = falling-shape-id ID' . #new-shape | |
#update . $shape _X _Y _BLOCKS = #input-u | |
// define available shapes and where they spawn |
This file contains hidden or 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
// {"enableUpdate":true,"enableVisualMode":true,"enableClearOnUpdate":false,"updateFrequency":4,"gridWidth":20,"gridHeight":20,"throne-playground-script":"0.1.0"} | |
draw "π" 5 5 | |
draw "π" 14 5 | |
draw "π" 14 14 | |
draw "π" 5 14 | |
draw "π" 7 8 | |
draw "throne" 7 9 | |
#update . draw "π" X Y = draw "π" X Y |
This file contains hidden or 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
// {"enableUpdate":false,"enableVisualMode":false,"enableClearOnUpdate":false,"updateFrequency":4,"gridWidth":20,"gridHeight":20,"throne-playground-script":"0.1.0"} | |
Mary is sister of David | |
Sarah is child of Mary | |
Tom is child of David | |
CHILD is child of PARENT . AUNT is sister of PARENT . COUSIN is child of AUNT = COUSIN is cousin of CHILD |
This file contains hidden or 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
// {"enableUpdate":true,"enableVisualMode":true,"enableClearOnUpdate":true,"updateFrequency":4,"gridWidth":20,"gridHeight":20,"throne-playground-script":"0.1.0"} | |
// Conway's Game of Life (https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life): | |
// 1. Any live cell with two or three live neighbours survives. | |
// 2. Any dead cell with three live neighbours becomes a live cell. | |
// 3. All other live cells die in the next generation. Similarly, all other dead cells stay dead. | |
// glider pattern | |
cell 1 0 | |
cell 2 1 |
This file contains hidden or 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
// {"enableUpdate":false,"enableVisualMode":false,"enableClearOnUpdate":false,"updateFrequency":4,"gridWidth":20,"gridHeight":20,"throne-playground-script":"0.1.0"} | |
// enter your guess here: | |
guess 2 | |
seed 34913906 | |
seed SEED . % SEED 1234 SEED' . % SEED' 10 SECRET = secret SECRET | |
guess GUESS: { | |
secret GUESS = "correct!" | |
secret SECRET . < GUESS SECRET = "too low!" |
OlderNewer