aboutsummaryrefslogtreecommitdiff
path: root/client/bitfont.py
diff options
context:
space:
mode:
authorTom Harley2017-12-02 19:43:44 +0000
committerTom Harley2017-12-02 19:43:44 +0000
commit50cc91d3343401d081557114469eed64306c6db3 (patch)
tree1d5d6a02cd2360c5fae3fa5d3edf0622108a4d7e /client/bitfont.py
parentyes (diff)
parentDocumentation (diff)
downloadlongpong-50cc91d3343401d081557114469eed64306c6db3.tar.gz
longpong-50cc91d3343401d081557114469eed64306c6db3.zip

Merge branch ‘master’ of https://github.com/magnostherobot/longpong

Diffstat (limited to 'client/bitfont.py')
-rw-r--r--client/bitfont.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/bitfont.py b/client/bitfont.py
index 7fa27b4..094616d 100644
--- a/client/bitfont.py
+++ b/client/bitfont.py
@@ -61,8 +61,12 @@ _bitfont_9 = [ True, True, True,
_bitfonts = [ _bitfont_0, _bitfont_1, _bitfont_2, _bitfont_3, _bitfont_4, _bitfont_5, _bitfont_6, _bitfont_7, _bitfont_8, _bitfont_9 ]
def bitfont(number):
- # Create the fonts
- # Generate the digits
+ """
+ Convert a base 10 number into a bitfont, which is represented by a list
+ representing a 3x5 grid, row by row. A value of True represents a cell
+ that should be drawn and a value of False represents a cell that should
+ be left blank.
+ """
result = []
number = add_digit(result, number)
while number > 0: