Skip to content

Commit

Permalink
Fix (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
meatball133 authored Apr 14, 2023
1 parent acbf6a9 commit 02f93e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exercises/concept/crystal-hunter/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Your goal is to write some rules that will be used in the game.

In the game, the character will get bonus points if they touch a bandit while having a power-up.

Define the `bonus_points?` method that takes two arguments (_if the character has an active power-up_ and _if the character is touching a bandit_) and returns a boolean value that tells whether the character will get bonus points or not.
Define the `Rules#bonus_points?` method that takes two arguments (_if the character has an active power-up_ and _if the character is touching a bandit_) and returns a boolean value that tells whether the character will get bonus points or not.
The method should return `true` only if the character has a power-up active and is touching a bandit, and `false` otherwise.

```Crystal
Expand All @@ -24,7 +24,7 @@ Rules.new.bonus_points?(false, true)

In the game, the player gets points when picking up a crystal or a power-up.

Define the `score?` method that takes two arguments (_if the character is touching a power-up_ and _if the character is touching a crystal_) and returns a boolean value indicating if the character scored or not.
Define the `Rules#score?` method that takes two arguments (_if the character is touching a power-up_ and _if the character is touching a crystal_) and returns a boolean value indicating if the character scored or not.
The method should return `true` if the character is touching a power-up or a crystal, and return `false` otherwise.

```crystal
Expand All @@ -34,7 +34,7 @@ Rules.new.score?(true, true)

## 3. Define if character loses

Define the `lose?` method that takes two arguments (_if the character has a power-up active_ and _if the character is touching a bandit_) and returns a boolean value that indicates if the character loses or not.
Define the `Rules#lose?` method that takes two arguments (_if the character has a power-up active_ and _if the character is touching a bandit_) and returns a boolean value that indicates if the character loses or not.
The method should return `true` if the character is touching a bandit and does not have a power-up active, and return `false` otherwise.

```crystal
Expand All @@ -44,7 +44,7 @@ Rules.new.lose?(false, true)

## 4. Define if character wins

Define the `win?` method that takes three arguments (_if the character has eaten all of the crystals_, _if the character has a power-up active_, and _if the character is touching a bandit_) and returns a boolean value indicating if the character wins or not.
Define the `Rules#win?` method that takes three arguments (_if the character has eaten all of the crystals_, _if the character has a power-up active_, and _if the character is touching a bandit_) and returns a boolean value indicating if the character wins or not.
The method should return `true` if the character has gathered all crystals and has not lost based on the arguments defined in part 3, and return `false` otherwise.

```crystal
Expand Down

0 comments on commit 02f93e6

Please sign in to comment.