Skip to content

Commit

Permalink
Fixed ground pixel and made score display clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
RedcodesDev committed Nov 30, 2022
1 parent c51cee6 commit 434bfbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def run():

#Jump if needed
if jumpState >= 1:
for y in range(5):
for y in range(4):
led.unplot(1, y)
if jumpState < 3:
led.plot_brightness(1, 2 - jumpState, 255)
Expand Down Expand Up @@ -92,7 +92,8 @@ def dead():
global score, mainMenu
basic.clear_screen()
basic.show_string("GAMEOVER")
basic.show_string("SCORE" + score)
basic.show_string("SCORE")
basic.show_number(score)
basic.clear_screen()
basic.plot_leds("""
. . # . .
Expand All @@ -101,6 +102,7 @@ def dead():
# . . . #
# . . . #
""")

mainMenu = True

#Method to start jumping
Expand Down
5 changes: 3 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function run() {
basic.pause(1000 / fps)
// Jump if needed
if (jumpState >= 1) {
for (y = 0; y < 5; y++) {
for (y = 0; y < 4; y++) {
led.unplot(1, y)
}
if (jumpState < 3) {
Expand Down Expand Up @@ -97,7 +97,8 @@ function dead() {

basic.clearScreen()
basic.showString("GAMEOVER")
basic.showString("SCORE" + score)
basic.showString("SCORE")
basic.showNumber(score)
basic.clearScreen()
basic.plotLeds(`
. . # . .
Expand Down

0 comments on commit 434bfbb

Please sign in to comment.