Tron minigame, removed still images

This commit is contained in:
KikooDX 2020-04-26 17:19:23 +02:00
parent 1a93942080
commit 9eddd23de8
7 changed files with 76 additions and 12 deletions

5
mc.py

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

File diff suppressed because one or more lines are too long

36
tron.py Normal file
View File

@ -0,0 +1,36 @@
from casioplot import *
from math import floor
C_BLACK = (0, 0, 0)
xspd = 1
yspd = 0
scrw = 0
scrh = 0
while get_pixel(scrw, 0):
scrw += 1
while get_pixel(0, scrh):
scrh += 1
x = floor(scrw / 2)
y = floor(scrh / 2)
clear_screen()
play = True
while play:
try:
while play:
x += xspd
y += yspd
if x == scrw:
x = 0
if y == scrh:
y = 0
if x == -1:
x = scrw - 1
if y == -1:
y = scrh - 1
if not get_pixel(x, y)[0]:
play = False
set_pixel(x, y, C_BLACK)
for i in range(100): show_screen()
except KeyboardInterrupt:
xspd, yspd = yspd, -xspd

36
tron/tron.py Normal file
View File

@ -0,0 +1,36 @@
from casioplot import *
from math import floor
C_BLACK = (0, 0, 0)
xspd = 1
yspd = 0
scrw = 0
scrh = 0
while get_pixel(scrw, 0):
scrw += 1
while get_pixel(0, scrh):
scrh += 1
x = floor(scrw / 2)
y = floor(scrh / 2)
clear_screen()
play = True
while play:
try:
while play:
x += xspd
y += yspd
if x == scrw:
x = 0
if y == scrh:
y = 0
if x == -1:
x = scrw - 1
if y == -1:
y = scrh - 1
if not get_pixel(x, y)[0]:
play = False
set_pixel(x, y, C_BLACK)
for i in range(100): show_screen()
except KeyboardInterrupt:
xspd, yspd = yspd, -xspd

BIN
usb.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB