1
0
Fork 0

apps: snake: Update artwork

Update the icon so it more closely resembles the in-game visual style
(and also so it compresses better) and update the screenshot since the
old one is the wrong size (FullHD instead of 358x406) and doesn't render
correctly in the documentation.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This commit is contained in:
Daniel Thompson 2020-12-28 10:08:15 +00:00
parent f38e7f8936
commit ff958d154f
3 changed files with 23 additions and 59 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -20,73 +20,36 @@ Once the game is over, you can try again by tapping on the screen and then swipe
And now: Have fun playing! :)
"""
# 2-bit RLE, generated from res/snake_icon.png, 856 bytes
snake_game = (
# 2-bit RLE, generated from res/snake_icon.png, 280 bytes
snake_icon = (
b'\x02'
b'`.'
b'\x19\x01\x16\x01?\n\x01@\x02AAQA\x80\x01\x81'
b'\x14\x015\x81\xc0\x07\xc1@\x03R\xc1\x80\x02\x81\x01\xc0'
b'$\xc1@IA\xceA\xc1\x016\x80\x01\x81\xc0\x03\xc1'
b'\xc1\xd1\xc1@\x02A\x01\x80\xff\x81\x81\x8e\x81\x81\xc0$'
b'\xc16@\x01A\x80\x03\x81\x81\x91\x81\xc0\x02\xc1\x01@'
b'\xffAQ\x80$\x816\xc0\x01\xc1@\x03AAQA'
b'\x80\x02\x81\x01\xc0\xdf\xc1@\xffANAA\x80$\x81'
b'6\xc0\x01\xc1@\x03AAQA\x80\x02\x81\x01\xc0\xdf'
b'\xc1@\xffANAA\x80$\x816\xc0\x01\xc1@\x03'
b'AAQA\x80\x02\x81\x01\xc0\xdf\xc1@\xffANA'
b'A\x80$\x816\xc0\x01\xc1@\x03AAQA\x80\x02'
b'\x81\x01\xc0\xdf\xc1@\xffANAA\x80$\x816\xc0'
b'\x01\xc1@\x03AAQA\x80\x02\x81\x01\xc0\xdf\xc1@'
b'\xffANAA\x80$\x816\xc0\x01\xc1@\x03AA'
b'QA\x80\x02\x81\x01\xc0\xdf\xc1@\xffANAA\x80'
b'$\x816\xc0\x01\xc1@\x03AAQA\x80\x02\x81\x01'
b'\xc0\xdf\xc1@\xffANAA\x80$\x816\xc0\x01\xc1'
b'@\x03AAQA\x80\x02\x81\x01\xc0\xdf\xc1@\xffA'
b'NAA\x80$\x816\xc0\x01\xc1@\x03AAQA'
b'\x80\x02\x81\x01\xc0\xdf\xc1@\xffANAA\x80$\x81'
b'6\xc0\x01\xc1@\x03AAQA\x80\x02\x81\x01\xc0\xdf'
b'\xc1@\xffANAA\x80$\x816\xc0\x01\xc1@\x03'
b'AAQA\x80\x02\x81\x01\xc0\xdf\xc1@\xffANA'
b'A\x80$\x816\xc0\x01\xc1@\x03AAQA\x80\x02'
b'\x81\x01\xc0\xdf\xc1@\xffANAA\x80$\x816\xc0'
b'\x01\xc1@\x03AAQA\x80\x02\x81\x01\xc0\xdf\xc1@'
b'\xffANAA\x80$\x816\xc0\x01\xc1@\x03AA'
b'QA\x80\x02\x81\x01\xc0\xdf\xc1@\xffANAA\x80'
b'$\x816\xc0\x01\xc1@\x03AAQA\x80\x02\x81\x01'
b'\xc0\xff\xc1\xd1@IA6\x80\x01\x81\xc0\x03\xc1\xc1\xd1'
b'\xc1@\x02A\x01\x80\xb6\x81\xc0\xdb\xc1\xce\xc1\xc1@$'
b'A6\x80\x01\x81\xc0\x03\xc1\xd2\xc1@\x02A\x01\x01\x01'
b'\x0e\x01\x01\x016\x01\x81\x81\x01\x0e\x01\x01\x81\x01\x14\x01'
b'4\x01\x01\x01\x80H\x81\xc0I\xc1\x8e\xc1\x81\x01\x01\x01'
b'\xc1\xc1\xce\xc1\xc1\x017\x01@\xffAQ\x80$\x81\x01'
b'\x01AQ\x817\x01AANAA\x81\x01\x01AA'
b'NAA\x817\x01\xc0\xdf\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01\xc1ANAA\x81\x01\x01'
b'\xc1ANAA\x817\x01AQ@IA\x01\x01\x80'
b'\xff\x81\x91A7\x01\xc0\xb6\xc1@\xdbANAA\x80'
b'$\x81\x01\x01\xc1ANAA\x818\x12\x03\x12?\r'
b'\x01\x14\x01?\x9c'
b'`@'
b'4@\x81M?\x14M?\x14M?\x14M?\x14M'
b'?\x14M?\x14M?\x14M?\x14M?U\x80\x0b'
b'\x8f?\x12\x8f\x10\xcd\x02\xcd%\x8f\x10\xcd\x02\xcd%\x8f'
b'\x10\xcd\x02\xcd%\x8f\x10\xcd\x02\xcd%\x8f\x10\xcd\x02\xcd'
b'%\x8f\x10\xcd\x02\xcd%\x8f\x10\xcd\x02\xcd%\x8f\x10\xcd'
b'\x02\xcd%\x8f\x10\xcd\x02\xcd%\x8f\x10\xcd\x02\xcd%\x8f'
b'\x10\xcd\x02\xcd%\x8f\x10\xcd\x02\xcd%\x8f\x10\xcd\x02\xcd'
b'%\x8f?s\xcd \xcd&\xcd \xcd&\xcd \xcd&'
b'\xcd \xcd&\xcd \xcd&\xcd \xcd&\xcd \xcd&'
b'\xcd \xcd&\xcd \xcd&\xcd \xcd&\xcd \xcd&'
b'\xcd \xcd&\xcd \xcd?\xa7\xcd\x02\xcd\x02\xcd\x02\xcd'
b'&\xcd\x02\xcd\x02\xcd\x02\xcd&\xcd\x02\xcd\x02\xcd\x02\xcd'
b'&\xcd\x02\xcd\x02\xcd\x02\xcd&\xcd\x02\xcd\x02\xcd\x02\xcd'
b'&\xcd\x02\xcd\x02\xcd\x02\xcd&\xcd\x02\xcd\x02\xcd\x02\xcd'
b'&\xcd\x02\xcd\x02\xcd\x02\xcd&\xcd\x02\xcd\x02\xcd\x02\xcd'
b'&\xcd\x02\xcd\x02\xcd\x02\xcd&\xcd\x02\xcd\x02\xcd\x02\xcd'
b'&\xcd\x02\xcd\x02\xcd\x02\xcd&\xcd\x02\xcd\x02\xcd\x02\xcd'
b'?\xff\xff\xff\x94'
)
import wasp, time
from random import randint
class SnakeGameApp():
NAME = 'Snake'
ICON = snake_game
ICON = snake_icon
def __init__(self):
self.running = True
@ -211,3 +174,4 @@ class Snake():
draw = wasp.watch.drawable
draw.fill(x=self.oldtail[0],y=self.oldtail[1],w=15,h=15,bg=0x0000)
draw.fill(x=self.body[-1][0]+1,y=self.body[-1][1]+1,w=13,h=13,bg=0xffff)