fix simple whitespace issues

This commit is contained in:
Xevion
2020-04-20 02:41:08 -05:00
parent 0d0a8f8b6a
commit f457ad0643
2 changed files with 6 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ import arcade
from config import Config, Enums from config import Config, Enums
class Mob(arcade.Sprite): class Mob(arcade.Sprite):
""" """
Represents a Mob. No defined behaviour, it has no intelligence. Represents a Mob. No defined behaviour, it has no intelligence.

View File

@@ -37,23 +37,24 @@ class AnimationSet(object):
# Finds all matching files # Finds all matching files
matches = [file for file in self.animations if re.match(pattern, file)] matches = [file for file in self.animations if re.match(pattern, file)]
# Sort in ascending order based on the connected animation index. Zero-indexing or not does not affect order. # Sort in ascending order based on the connected animation index. Zero-indexing or not does not affect order.
matches.sort(key=lambda match : int(match.group(1))) matches.sort(key=lambda match: int(match.group(1)))
# Grab the filename and load it to the file directory # Grab the filename and load it to the file directory
matches = list(map(lambda match : arcade.load_texture(os.path.join(self.directory, match.group(0))), matches)) matches = list(map(lambda match: arcade.load_texture(os.path.join(self.directory, match.group(0))), matches))
return cycle(matches) return cycle(matches)
class PlayerAnimations(AnimationSet): class PlayerAnimations(AnimationSet):
""" """
A class dedicated to serving player animations. A class dedicated to serving player animations.
Player animations must be served to the class in the correct format. Player animations must be served to the class in the correct format.
""" """
def __init__(self): def __init__(self, directory: str):
""" """
Initializes the PlayerAnimations class. Initializes the PlayerAnimations class.
""" """
super(PlayerAnimations, self).__init__() super(PlayerAnimations, self).__init__(directory)
# Grabs all animations needed. These are infinite iters, use next(iter) to grab the next animation. # Grabs all animations needed. These are infinite iters, use next(iter) to grab the next animation.
self.idles = self.getAnimations(re.compile(r'idle_(\d+).png')) self.idles = self.getAnimations(re.compile(r'idle_(\d+).png'))
@@ -61,5 +62,3 @@ class PlayerAnimations(AnimationSet):
self.right = self.getAnimations(re.compile(r'run_right_(\d+).png')) self.right = self.getAnimations(re.compile(r'run_right_(\d+).png'))
self.up = self.getAnimations(re.compile(r'run_up_(\d+).png')) self.up = self.getAnimations(re.compile(r'run_up_(\d+).png'))
self.down = self.getAnimations(re.compile(r'run_left_(\d+).png')) self.down = self.getAnimations(re.compile(r'run_left_(\d+).png'))
def __loadAnimations(self):