Tron minigame, removed still images
This commit is contained in:
parent
1a93942080
commit
9eddd23de8
BIN
spongebob.png
BIN
spongebob.png
Binary file not shown.
Before Width: | Height: | Size: 87 KiB |
File diff suppressed because one or more lines are too long
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue