Skip to content

Commit 4294315

Browse files
committed
grammar fixes
1 parent 953197c commit 4294315

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

exercises/concept/annalyns-infiltration/.docs/instructions.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
# Instructions
22

3-
In this exercise, you'll be implementing the quest logic for a new RPG game a friend is developing.
3+
In this exercise, you'll implement the quest logic for a new RPG game that a friend is developing.
44
The game's main character is Annalyn, a brave girl with a fierce and loyal pet dog.
5-
Unfortunately, disaster strikes, as her best friend was kidnapped while searching for berries in the forest.
6-
Annalyn will try to find and free her best friend, optionally taking her dog with her on this quest.
5+
Unfortunately, disaster strikes: her best friend was kidnapped while searching for berries in the forest.
6+
Annalyn will try to find and rescue her friend, optionally taking her dog along on the quest.
77

8-
After some time spent following her best friend's trail, she finds the camp in which her best friend is imprisoned.
8+
After some time spent following the trail, Annalyn discovers the camp where her friend is imprisoned.
99
It turns out there are two kidnappers: a mighty knight and a cunning archer.
1010

1111
Having found the kidnappers, Annalyn considers which of the following actions she can engage in:
1212

13-
- Fast attack: a fast attack can be made if the knight is sleeping, as it takes time for him to get his armor on, so he will be vulnerable.
13+
- Fast attack: a fast attack can be made if the knight is sleeping, as it takes time for him to put on his armor, leaving him vulnerable.
1414
- Spy: the group can be spied upon if at least one of them is awake.
1515
Otherwise, spying is a waste of time.
16-
- Signal prisoner: the prisoner can be signalled using bird sounds if the prisoner is awake and the archer is sleeping, as archers are trained in bird signaling, so they could intercept the message.
17-
- _Free prisoner_: Annalyn can try sneaking into the camp to free the prisoner.
18-
This is a risky thing to do and can only succeed in one of two ways:
19-
- If Annalyn has her pet dog with her she can rescue the prisoner if the archer is asleep.
16+
- Signal prisoner: the prisoner can be signaled using bird sounds if the prisoner is awake and the archer is sleeping.
17+
Archers are trained in bird signaling and could intercept the message if they are awake.
18+
- _Free prisoner_: Annalyn can attempt to sneak into the camp to free the prisoner.
19+
This is risky and can only succeed in one of two ways:
20+
- If Annalyn has her pet dog, she can rescue the prisoner if the archer is asleep.
2021
The knight is scared of the dog and the archer will not have time to get ready before Annalyn and the prisoner can escape.
21-
- If Annalyn does not have her dog then she and the prisoner must be very sneaky!
22-
Annalyn can free the prisoner if the prisoner is awake and the knight and archer are both sleeping, but if the prisoner is sleeping they can't be rescued: the prisoner would be startled by Annalyn's sudden appearance and wake up the knight and archer.
22+
- If Annalyn does not have her pet dog, then she and the prisoner must be very sneaky!
23+
Annalyn can free the prisoner if the prisoner is awake and both the knight and archer are sleeping.
24+
However, if the prisoner is sleeping, they can't be rescued, as the prisoner would be startled by Annalyn's sudden appearance and wake up the knight and archer.
2325

24-
You have four tasks: to implement the logic for determining if the above actions are available based on the state of the three characters found in the forest and whether Annalyn's pet dog is present or not.
26+
You have four tasks: to implement the logic for determining if the above actions are available based on the state of the three characters in the forest and whether Annalyn's pet dog is present or not.
2527

2628
## 1. Check if a fast attack can be made
2729

28-
Implement the (_static_) `AnnalynsInfiltration.canFastAttack()` method that takes a boolean value that indicates if the knight is awake.
30+
Implement the (_static_) `AnnalynsInfiltration.canFastAttack()` method, which takes a boolean value indicating whether the knight is awake.
2931
This method returns `true` if a fast attack can be made based on the state of the knight.
30-
Otherwise, returns `false`:
32+
Otherwise, it returns `false`:
3133

3234
```java
3335
boolean knightIsAwake = true;
@@ -37,9 +39,9 @@ AnnalynsInfiltration.canFastAttack(knightIsAwake);
3739

3840
## 2. Check if the group can be spied upon
3941

40-
Implement the (_static_) `AnnalynsInfiltration.canSpy()` method that takes three boolean values, indicating if the knight, archer and the prisoner, respectively, are awake.
41-
The method returns `true` if the group can be spied upon, based on the state of the three characters.
42-
Otherwise, returns `false`:
42+
Implement the (_static_) `AnnalynsInfiltration.canSpy()` method, which takes three boolean values indicating whether the knight, archer, and prisoner, respectively, are awake.
43+
The method returns `true` if the group can be spied upon based on the state of the three characters.
44+
Otherwise, it returns `false`:
4345

4446
```java
4547
boolean knightIsAwake = false;
@@ -49,11 +51,11 @@ AnnalynsInfiltration.canSpy(knightIsAwake, archerIsAwake, prisonerIsAwake);
4951
// => true
5052
```
5153

52-
## 3. Check if the prisoner can be signalled
54+
## 3. Check if the prisoner can be signaled
5355

54-
Implement the (_static_) `AnnalynsInfiltration.canSignalPrisoner()` method that takes two boolean values, indicating if the archer and the prisoner, respectively, are awake.
55-
The method returns `true` if the prisoner can be signalled, based on the state of the two characters.
56-
Otherwise, returns `false`:
56+
Implement the (_static_) `AnnalynsInfiltration.canSignalPrisoner()` method, which takes two boolean values indicating whether the archer and the prisoner, respectively, are awake.
57+
The method returns `true` if the prisoner can be signaled based on the state of the two characters.
58+
Otherwise, it returns `false`:
5759

5860
```java
5961
boolean archerIsAwake = false;
@@ -64,10 +66,10 @@ AnnalynsInfiltration.canSignalPrisoner(archerIsAwake, prisonerIsAwake);
6466

6567
## 4. Check if the prisoner can be freed
6668

67-
Implement the (_static_) `AnnalynsInfiltration.canFreePrisoner()` method that takes four boolean values.
68-
The first three parameters indicate if the knight, archer and the prisoner, respectively, are awake.
69-
The last parameter indicates if Annalyn's pet dog is present.
70-
The method returns `true` if the prisoner can be freed based on the state of the three characters and Annalyn's pet dog's presence.
69+
Implement the (_static_) `AnnalynsInfiltration.canFreePrisoner()` method, which takes four boolean values.
70+
The first three parameters indicate whether the knight, archer, and prisoner, respectively, are awake.
71+
The last parameter indicates whether Annalyn's pet dog is present.
72+
The method returns `true` if the prisoner can be freed based on the state of the three characters and the presence of Annalyn's pet dog.
7173
Otherwise, it returns `false`:
7274

7375
```java

exercises/concept/annalyns-infiltration/.docs/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Booleans in Java are represented by the `boolean` type, which values can be eith
77
Java supports three boolean operators:
88

99
- `!` (NOT): negates the boolean
10-
- `&&` (AND): takes two booleans and results in true if they're both true
11-
- `||` (OR): results in true if any of the two booleans is true
10+
- `&&` (AND): takes two booleans and returns `true` if they're both `true`
11+
- `||` (OR): returns `true` if any of the two booleans is `true`
1212

1313
### Examples
1414

0 commit comments

Comments
 (0)