forked from NM-TAFE/civ-ipriot-smiley
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sad.py
26 lines (21 loc) · 721 Bytes
/
sad.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from smiley import Smiley
class Sad(Smiley):
def __init__(self):
super().__init__()
self.draw_mouth()
self.draw_eyes()
def draw_mouth(self):
"""
Method that draws the mouth on the standard faceless smiley.
"""
mouth = [49, 54, 42, 43, 44, 45]
for pixel in mouth:
self.pixels[pixel] = self.BLANK
def draw_eyes(self, wide_open=True):
"""
Method that draws the eyes (open or closed) on the standard smiley.
:param wide_open: True if eyes opened, False otherwise
"""
eyes = [10, 13, 18, 21]
for pixel in eyes:
self.pixels[pixel] = self.BLANK if wide_open else self.YELLOW