Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions exercises/concept/ellens-alien-game/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
class Alien:
"""Create an Alien object with location x_coordinate and y_coordinate.

Attributes
----------
(class)total_aliens_created: int
x_coordinate: int - Position on the x-axis.
y_coordinate: int - Position on the y-axis.
health: int - Number of health points.

Methods
-------
hit(): Decrement Alien health by one point.
is_alive(): Return a boolean for if Alien is alive (if health is > 0).
teleport(new_x_coordinate, new_y_coordinate): Move Alien object to new coordinates.
collision_detection(other): Implementation TBD.
Attributes:
(class) total_aliens_created (int): Total number of Alien instances.
x_coordinate (int): Position on the x-axis.
y_coordinate (int): Position on the y-axis.
health (int): Number of health points.

Methods:
hit(): Decrement Alien health by one point.
is_alive(): Return a boolean for if Alien is alive (if health is > 0).
teleport(new_x_coordinate, new_y_coordinate): Move Alien object to new coordinates.
collision_detection(other): Implementation TBD.

"""

pass


#TODO: create the new_aliens_collection() function below to call your Alien class with a list of coordinates.
#TODO (Student): Create the new_aliens_collection() function below to call your Alien class with a list of coordinates

Loading