Skip to content

Commit

Permalink
General Cleaning
Browse files Browse the repository at this point in the history
Reworded clumsy sentences, deleted whitespace, fixed typos, removed some back-quotes to improve consistency with other documentation.
  • Loading branch information
PaulT89 authored and BethanyG committed Feb 17, 2022
1 parent adae936 commit d39dfe3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions exercises/concept/ellens-alien-game/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
## 5. The `collision_detection` Method

- Remember that object methods are always passed `self` as the first parameter.
- If you wish to 'pass' on completing a method, Python has a keyword for that.
- This method seems like an excellent place to use some kind of placeholder.

## 6. Alien Counter

Expand All @@ -32,5 +32,5 @@
## 7. Object Creation

- A tuple would be a _single_ parameter.
- Alien takes 2 parameters.
- The Alien constructor takes 2 parameters.
- Unpacking what is _inside_ the tuple might be closer to what you need.
13 changes: 6 additions & 7 deletions exercises/concept/ellens-alien-game/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ Now, each alien should be able to internally keep track of it's own position and

## 2. The `hit` Method

Ellen would like the Alien `class` to have a `hit method` that decrements the health of an alien object by 1 when called.
Ellen would like the Alien `class` to have a `hit` method that decrements the health of an alien object by 1 when called.
This way, she can simply call `<alien>.hit()` instead of having to manually change an alien's health.


```python
>>> alien = Alien(0, 0)
>>> alien.health
Expand All @@ -44,7 +43,7 @@ This way, she can simply call `<alien>.hit()` instead of having to manually chan
## 3. The `is_alive` Method

You realize that if the health keeps decreasing, at some point it will probably hit 0 (or even less!).
It would be a good idea to add an `is_alive method` that Ellen can quickly call to check if the alien is... well... alive. 😉
It would be a good idea to add an `is_alive` method that Ellen can quickly call to check if the alien is... well... alive. 😉
`<alien>.is_alive()` should return a boolean.

```python
Expand All @@ -62,7 +61,7 @@ False
## 4. The `teleport` Method

In Ellen's game, the aliens have the ability to teleport!
You will need to write a `teleport method` that takes new `x_coordinate` and `y_coordinate` values, and changes the alien's coordinates accordingly.
You will need to write a `teleport` method that takes new `x_coordinate` and `y_coordinate` values, and changes the alien's coordinates accordingly.

```python
>>> alien.teleport(5, -4)
Expand All @@ -76,9 +75,9 @@ You will need to write a `teleport method` that takes new `x_coordinate` and `y_

Obviously, if the aliens can be hit by something, then they need to be able to detect when such a collision has occurred.
However, collision detection algorithms can be tricky, and you do not yet know how to implement one.
Ellen has said that she will do it later, but she would still like the `method` to appear in the `class` as a reminder to build out the functionality.
Ellen has said that she will do it later, but she would still like the `collision_detection` method to appear in the class as a reminder to build out the functionality.
It will need to take a variable of some kind (probably another object), but that's really all you know.
You will need to make sure that putting in the `method` definition into the `class` doesn't cause any errors when called:
You will need to make sure that putting the method definition into the class doesn't cause any errors when called:

```python
>>> alien.collision_detection(other_object)
Expand Down Expand Up @@ -109,7 +108,7 @@ For example:

## 7. Object Creation

Ellen loves what you've done so far, but she has a favor to ask.
Ellen loves what you've done so far, but she has one more favor to ask.
She would like a standalone function that will create a `list` of alien objects, given a list of positions (as `tuples`).

For example:
Expand Down

0 comments on commit d39dfe3

Please sign in to comment.