capitalex / Typing Game?
0 likes
0 forks
1 files
Last active 3 hours ago
| 1 | score = 0 |
| 2 | timer = 30 |
| 3 | letter = string.char(math.random(97, 122)) |
| 4 | font = love.graphics.newFont(48) |
| 5 | gameover = false |
| 6 | love.graphics.setFont(font) |
| 7 | |
| 8 | function love.update(dt) |
| 9 | timer = timer - dt |
| 10 | if timer <= 0 then |
capitalex / Lights Out
0 likes
0 forks
1 files
Last active 3 hours ago
| 1 | local size = 100 |
| 2 | local offsetH, offsetW = love.graphics.getHeight() / 2 - 250, love.graphics.getWidth() / 2 - 250 |
| 3 | |
| 4 | local grid = { |
| 5 | {false, false, false, false, false}, |
| 6 | {false, false, false, false, false}, |
| 7 | {false, false, false, false, false}, |
| 8 | {false, false, false, false, false}, |
| 9 | {false, false, false, false, false}, |
| 10 | } |
june / Stored Tasks
0 likes
0 forks
1 files
Last active 2 weeks ago
Store, recall and execute tasks in Nova.
| 1 | ||:: task foo |
| 2 | :: do something |
| 3 | :: do another thing |
| 4 | :: do yet another thing |
| 5 | :: end task |
| 6 | :: task bar |
| 7 | :: do another thing |
| 8 | :: do something |
| 9 | :: do yet another thing |
| 10 | :: end task |
june / Accounting Mocks
0 likes
0 forks
1 files
Last active 3 weeks ago
An example of turning pseudocode into a functional model.
| 1 | |# First, we need to import conditional statements. #| |
| 2 | ||'@include' https://gist.nouveau.community/june/72f7794abbf64eb3890e2715d7e7789b/raw/HEAD/conditional.nv |
| 3 | |
| 4 | |# Let's try something. #| |
| 5 | ||:: test the happy path |
| 6 | :: log in as june |
| 7 | :: transfer 100 from 1234 to 5678 |
| 8 | :: log out |
| 9 | |
| 10 | ||:: test the sad path |
june / Conditional Logic
0 likes
0 forks
1 files
Last active 3 weeks ago
If/else statements, implemented in Nova.
| 1 | ||:@control.enabled: |
| 2 | |
| 3 | || :@control.if: if |
| 4 | || :@control.then: then |
| 5 | || :@control.end: end |
| 6 | || :@control.else: else |
| 7 | || :@control.fail: fail |
| 8 | | :@control.enabled:? |
| 9 | :@control.fail: $fail? |
| 10 | :@control.then: $then? |
Newer
Older