This is a SCRIPT-8 cassette.
Created
January 15, 2019 06:21
-
-
Save gabrielflorit/642160d299e06e4385e04c57c54b8eec to your computer and use it in GitHub Desktop.
SCRIPT-8
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
{} |
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: pulsing hellos | |
initialState = { | |
counter: 0, | |
i: 0 | |
} | |
update = (state) => { | |
state.i++ | |
if (state.i > 5) { | |
state.counter++ | |
state.i = 0 | |
} | |
} | |
draw = ({ counter }) => { | |
clear() | |
print(0, 0, 'Hello world!', 7 + counter) | |
print(8, 8, 'Hello world!', 6 + counter) | |
print(16, 16, 'Hello world!', 5 + counter) | |
print(24, 24, 'Hello world!', 4 + counter) | |
print(32, 32, 'Hello world!', 3 + counter) | |
print(40, 40, 'Hello world!', 2 + counter) | |
print(48, 48, 'Hello world!', 1 + counter) | |
print(56, 56, 'Hello world!', 0 + counter) | |
print(64, 64, 'Hello world!', 7 + counter) | |
print(72, 72, 'Hello world!', 6 + counter) | |
print(80, 80, 'Hello world!', 5 + counter) | |
print(88, 88, 'Hello world!', 4 + counter) | |
print(96, 102, 'Hello world!', 3 + counter) | |
print(106, 116, 'Hello world!', 2 + counter) | |
} |
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
[] |
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
{} |
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
{} |
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
{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment