diff --git a/game.py b/game.py index bd61b4f..5e7640f 100644 --- a/game.py +++ b/game.py @@ -7,6 +7,11 @@ import random import json def normalDist(difficulty): + """ + This function generates a random number between 0-1 + that should be used to get a font with a difficulty + equal to or less than the number returned. + """ # Create a random number between 0-1 v = random.randint(-1000, 1000) / 1000 # Redistribute the number @@ -40,6 +45,9 @@ class Game(gameUtils.Game): self.fonts = {} + # I haven't finished this yet, you might want to create + # an object or something, I don't know. Keep in mind you + # have to load all of the font files for use later. with open(f'./fonts/fonts.json', 'r') as f: j = json.loads(f.read()) @@ -47,6 +55,11 @@ class Game(gameUtils.Game): # self.fonts.update() def createCaptcha(self): + """ + Use PIL (https://pillow.readthedocs.io/en/stable/handbook/tutorial.html) + to draw the fonts, add noise, random shapes, transforms etc. based on + self.gameDifficulty + """ pass def onEvent(self, event):