From 6ef3f8d2f747e930dc0c588e725c339e080d5784 Mon Sep 17 00:00:00 2001
From: devkabiir <18462563+devkabiir@users.noreply.github.com>
Date: Fri, 7 Apr 2023 20:23:13 +0530
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=20(concepts)=20Add=20concept=20exe?=
=?UTF-8?q?rcise=20`annalyns-infiltration`?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This concept is inspired from the same in csharp track
---
config.json | 15 +-
.../annalyns-infiltration/.docs/hints.md | 13 +
.../.docs/instructions.md | 69 +++
.../.docs/introduction.md | 11 +
.../concept/annalyns-infiltration/.gitignore | 8 +
.../annalyns-infiltration/.meta/config.json | 22 +
.../annalyns-infiltration/.meta/design.md | 21 +
.../annalyns-infiltration/.meta/exemplar.rs | 21 +
.../concept/annalyns-infiltration/Cargo.toml | 4 +
.../concept/annalyns-infiltration/src/lib.rs | 20 +
.../tests/annalyns-infiltration.rs | 401 ++++++++++++++++++
11 files changed, 604 insertions(+), 1 deletion(-)
create mode 100644 exercises/concept/annalyns-infiltration/.docs/hints.md
create mode 100644 exercises/concept/annalyns-infiltration/.docs/instructions.md
create mode 100644 exercises/concept/annalyns-infiltration/.docs/introduction.md
create mode 100644 exercises/concept/annalyns-infiltration/.gitignore
create mode 100644 exercises/concept/annalyns-infiltration/.meta/config.json
create mode 100644 exercises/concept/annalyns-infiltration/.meta/design.md
create mode 100644 exercises/concept/annalyns-infiltration/.meta/exemplar.rs
create mode 100644 exercises/concept/annalyns-infiltration/Cargo.toml
create mode 100644 exercises/concept/annalyns-infiltration/src/lib.rs
create mode 100644 exercises/concept/annalyns-infiltration/tests/annalyns-infiltration.rs
diff --git a/config.json b/config.json
index 3ad25420c..f0f2b2281 100644
--- a/config.json
+++ b/config.json
@@ -35,6 +35,17 @@
},
"exercises": {
"concept": [
+ {
+ "slug": "annalyns-infiltration",
+ "name": "Annalyn's Infiltration",
+ "uuid": "897fa2ea-c29c-4d4e-9469-ff661a9b838a",
+ "difficulty": 1,
+ "concepts": [
+ "booleans"
+ ],
+ "prerequisites": [],
+ "status": "active"
+ },
{
"slug": "lucians-luscious-lasagna",
"uuid": "29a2d3bd-eec8-454d-9dba-4b2d7d071925",
@@ -43,7 +54,9 @@
"concepts": [
"functions"
],
- "prerequisites": [],
+ "prerequisites": [
+ "booleans"
+ ],
"status": "active"
},
{
diff --git a/exercises/concept/annalyns-infiltration/.docs/hints.md b/exercises/concept/annalyns-infiltration/.docs/hints.md
new file mode 100644
index 000000000..9bb55aa8d
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/.docs/hints.md
@@ -0,0 +1,13 @@
+# Hints
+
+## General
+
+- There are three boolean operators[1] [2] to work with boolean values.
+- Multiple operators can be combined in a single expression.
+
+## 2. Check if a fast attack can be made
+
+- The boolean operators[1] [2] can also be applied to boolean parameters.
+
+[1]: https://doc.rust-lang.org/reference/expressions/operator-expr.html#lazy-boolean-operators
+[2]: https://doc.rust-lang.org/reference/expressions/operator-expr.html#negation-operators
diff --git a/exercises/concept/annalyns-infiltration/.docs/instructions.md b/exercises/concept/annalyns-infiltration/.docs/instructions.md
new file mode 100644
index 000000000..ab9c6fac5
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/.docs/instructions.md
@@ -0,0 +1,69 @@
+# Instructions
+
+In this exercise, you'll be implementing the quest logic for a new RPG game a friend is developing.
+
+The game's main character is Annalyn, a brave girl with a fierce and loyal pet dog. Unfortunately, disaster strikes, as her best friend was kidnapped while searching for berries in the forest.
+
+Annalyn will try to find and free her best friend, optionally taking her dog with her on this quest.
+
+After some time spent following her best friend's trail, she finds the camp in which her best friend is imprisoned. It turns out there are two kidnappers: a mighty knight and a cunning archer.
+
+Having found the kidnappers, Annalyn considers which of the following actions she can engage in:
+
+- _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.
+- _Spy_: the group can be spied upon if at least one of them is awake. Otherwise, spying is a waste of time.
+- _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.
+- _Free prisoner_: Annalyn can try sneaking into the camp to free the prisoner.
+ This is a risky thing to do and can only succeed in one of two ways:
+ - If Annalyn has her pet dog with her she can rescue the prisoner if the archer is asleep.
+ The knight is scared of the dog and the archer will not have time to get ready before Annalyn and the prisoner can escape.
+ - If Annalyn does not have her dog then she and the prisoner must be very sneaky!
+ 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.
+
+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.
+
+## 1. Check if a fast attack can be made
+
+Implement the `can_fast_attack()` function that takes a boolean value that indicates if the knight is awake. This function returns `true` if a fast attack can be made based on the state of the knight. Otherwise, returns `false`:
+
+```rust
+let knight_is_awake = true;
+can_fast_attack(knight_is_awake);
+// => false
+```
+
+## 2. Check if the group can be spied upon
+
+Implement the `can_spy()` function that takes three boolean values, indicating if the knight, archer and the prisoner, respectively, are awake. The function returns `true` if the group can be spied upon, based on the state of the three characters. Otherwise, returns `false`:
+
+```rust
+let knight_is_awake = false;
+let archer_is_awake = true;
+let prisoner_is_awake = false;
+can_spy(knight_is_awake, archer_is_awake, prisoner_is_awake);
+// => true
+```
+
+## 3. Check if the prisoner can be signalled
+
+Implement the `can_signal_prisoner()` function that takes two boolean values, indicating if the archer and the prisoner, respectively, are awake. The function returns `true` if the prisoner can be signalled, based on the state of the two characters. Otherwise, returns `false`:
+
+```rust
+let archer_is_awake = false;
+let prisoner_is_awake = true;
+can_signal_prisoner(archer_is_awake, prisoner_is_awake);
+// => true
+```
+
+## 4. Check if the prisoner can be freed
+
+Implement the `can_free_prisoner()` function that takes four boolean values. The first three parameters indicate if the knight, archer and the prisoner, respectively, are awake. The last parameter indicates if Annalyn's pet dog is present. The function returns `true` if the prisoner can be freed based on the state of the three characters and Annalyn's pet dog presence. Otherwise, it returns `false`:
+
+```rust
+let knight_is_awake = false;
+let archer_is_awake = true;
+let prisoner_is_awake = false;
+let pet_dog_is_present = false;
+can_free_prisoner(knight_is_awake, archer_is_awake, prisoner_is_awake, pet_dog_is_present);
+// => false
+```
diff --git a/exercises/concept/annalyns-infiltration/.docs/introduction.md b/exercises/concept/annalyns-infiltration/.docs/introduction.md
new file mode 100644
index 000000000..90428b012
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/.docs/introduction.md
@@ -0,0 +1,11 @@
+# Introduction
+
+## Booleans
+
+[Booleans in Rust][booleans-rust-book] are represented by the `bool` type, which values can be either `true` or `false`.
+
+Rust supports three boolean operators: `!` (NOT), `&&` (AND), and `||` (OR).
+
+
+[booleans-rust-book]:
+ https://doc.rust-lang.org/book/ch03-02-data-types.html#the-boolean-type
diff --git a/exercises/concept/annalyns-infiltration/.gitignore b/exercises/concept/annalyns-infiltration/.gitignore
new file mode 100644
index 000000000..db7f315c0
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/.gitignore
@@ -0,0 +1,8 @@
+# Generated by Cargo
+# will have compiled files and executables
+/target/
+**/*.rs.bk
+
+# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
+# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
+Cargo.lock
diff --git a/exercises/concept/annalyns-infiltration/.meta/config.json b/exercises/concept/annalyns-infiltration/.meta/config.json
new file mode 100644
index 000000000..efd69e570
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/.meta/config.json
@@ -0,0 +1,22 @@
+{
+ "forked_from": [
+ "fsharp/annalyns-infiltration"
+ ],
+ "blurb": "Learn about booleans while helping Annalyn rescue her friend.",
+ "authors": [
+ "devkabiir"
+ ],
+ "contributors": [],
+ "files": {
+ "solution": [
+ "src/lib.rs",
+ "Cargo.toml"
+ ],
+ "test": [
+ "tests/annalyns-infiltration.rs"
+ ],
+ "exemplar": [
+ ".meta/exemplar.rs"
+ ]
+ }
+}
diff --git a/exercises/concept/annalyns-infiltration/.meta/design.md b/exercises/concept/annalyns-infiltration/.meta/design.md
new file mode 100644
index 000000000..22419dca1
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/.meta/design.md
@@ -0,0 +1,21 @@
+# Design
+
+## Learning objectives
+
+- Know of the existence of the `bool` type and its two values.
+- Know about boolean operators and how to build logical expressions with them.
+- Know of the boolean operator precedence rules.
+
+## Out of scope
+
+- Pattern matching on booleans.
+
+## Concepts
+
+- `booleans`: know of the existence of the `bool` type and its two values; know about boolean operators and how to build logical expressions with them; know of the boolean operator precedence rules.
+
+## Prerequisites
+
+This exercise's prerequisites Concepts are:
+
+- none
diff --git a/exercises/concept/annalyns-infiltration/.meta/exemplar.rs b/exercises/concept/annalyns-infiltration/.meta/exemplar.rs
new file mode 100644
index 000000000..390082f9c
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/.meta/exemplar.rs
@@ -0,0 +1,21 @@
+pub fn can_fast_attack(knight_is_awake: bool) -> bool {
+ return !knight_is_awake;
+}
+
+pub fn can_spy(knight_is_awake: bool, archer_is_awake: bool, prisoner_is_awake: bool) -> bool {
+ return knight_is_awake || archer_is_awake || prisoner_is_awake;
+}
+
+pub fn can_signal_prisoner(archer_is_awake: bool, prisoner_is_awake: bool) -> bool {
+ return !archer_is_awake && prisoner_is_awake;
+}
+
+pub fn can_free_prisoner(
+ knight_is_awake: bool,
+ archer_is_awake: bool,
+ prisoner_is_awake: bool,
+ pet_dog_is_present: bool,
+) -> bool {
+ return !knight_is_awake && !archer_is_awake && prisoner_is_awake
+ || !archer_is_awake && pet_dog_is_present;
+}
diff --git a/exercises/concept/annalyns-infiltration/Cargo.toml b/exercises/concept/annalyns-infiltration/Cargo.toml
new file mode 100644
index 000000000..1abcea86c
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/Cargo.toml
@@ -0,0 +1,4 @@
+[package]
+edition = "2021"
+name = "annalyns_infiltration"
+version = "1.0.0"
diff --git a/exercises/concept/annalyns-infiltration/src/lib.rs b/exercises/concept/annalyns-infiltration/src/lib.rs
new file mode 100644
index 000000000..70bfa4f77
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/src/lib.rs
@@ -0,0 +1,20 @@
+pub fn can_fast_attack(knight_is_awake: bool) -> bool {
+ unimplemented!("Implement can_fast_attack");
+}
+
+pub fn can_spy(knight_is_awake: bool, archer_is_awake: bool, prisoner_is_awake: bool) -> bool {
+ unimplemented!("Implement can_spy");
+}
+
+pub fn can_signal_prisoner(archer_is_awake: bool, prisoner_is_awake: bool) -> bool {
+ unimplemented!("Implement can_signal_prisoner");
+}
+
+pub fn can_free_prisoner(
+ knight_is_awake: bool,
+ archer_is_awake: bool,
+ prisoner_is_awake: bool,
+ pet_dog_is_present: bool,
+) -> bool {
+ unimplemented!("Implement can_free_prisoner");
+}
diff --git a/exercises/concept/annalyns-infiltration/tests/annalyns-infiltration.rs b/exercises/concept/annalyns-infiltration/tests/annalyns-infiltration.rs
new file mode 100644
index 000000000..93d139da2
--- /dev/null
+++ b/exercises/concept/annalyns-infiltration/tests/annalyns-infiltration.rs
@@ -0,0 +1,401 @@
+#[test]
+fn cannot_execute_fast_attack_if_knight_is_awake() {
+ let knight_is_awake = true;
+ assert!(!annalyns_infiltration::can_fast_attack(knight_is_awake));
+}
+
+#[test]
+#[ignore]
+fn can_execute_fast_attack_if_knight_is_sleeping() {
+ let knight_is_awake = false;
+ assert!(annalyns_infiltration::can_fast_attack(knight_is_awake));
+}
+
+#[test]
+#[ignore]
+fn cannot_spy_if_everyone_is_sleeping() {
+ let knight_is_awake = false;
+ let archer_is_awake = false;
+ let prisoner_is_awake = false;
+ assert!(!annalyns_infiltration::can_spy(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_spy_if_everyone_but_knight_is_sleeping() {
+ let knight_is_awake = true;
+ let archer_is_awake = false;
+ let prisoner_is_awake = false;
+ assert!(annalyns_infiltration::can_spy(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_spy_if_everyone_but_archer_is_sleeping() {
+ let knight_is_awake = false;
+ let archer_is_awake = true;
+ let prisoner_is_awake = false;
+ assert!(annalyns_infiltration::can_spy(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_spy_if_everyone_but_prisoner_is_sleeping() {
+ let knight_is_awake = false;
+ let archer_is_awake = false;
+
+ let prisoner_is_awake = true;
+ assert!(annalyns_infiltration::can_spy(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_spy_if_only_knight_is_sleeping() {
+ let knight_is_awake = false;
+ let archer_is_awake = true;
+ let prisoner_is_awake = true;
+ assert!(annalyns_infiltration::can_spy(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_spy_if_only_archer_is_sleeping() {
+ let knight_is_awake = true;
+ let archer_is_awake = false;
+ let prisoner_is_awake = true;
+ assert!(annalyns_infiltration::can_spy(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_spy_if_only_prisoner_is_sleeping() {
+ let knight_is_awake = true;
+ let archer_is_awake = true;
+ let prisoner_is_awake = false;
+ assert!(annalyns_infiltration::can_spy(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_spy_if_everyone_is_awake() {
+ let knight_is_awake = true;
+ let archer_is_awake = true;
+ let prisoner_is_awake = true;
+ assert!(annalyns_infiltration::can_spy(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_signal_prisoner_if_archer_is_sleeping_and_prisoner_is_awake() {
+ let archer_is_awake = false;
+ let prisoner_is_awake = true;
+ assert!(annalyns_infiltration::can_signal_prisoner(
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_signal_prisoner_if_archer_is_awake_and_prisoner_is_sleeping() {
+ let archer_is_awake = true;
+ let prisoner_is_awake = false;
+ assert!(!annalyns_infiltration::can_signal_prisoner(
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_signal_prisoner_if_archer_and_prisoner_are_both_sleeping() {
+ let archer_is_awake = false;
+ let prisoner_is_awake = false;
+ assert!(!annalyns_infiltration::can_signal_prisoner(
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_signal_prisoner_if_archer_and_prisoner_are_both_awake() {
+ let archer_is_awake = true;
+ let prisoner_is_awake = true;
+ assert!(!annalyns_infiltration::can_signal_prisoner(
+ archer_is_awake,
+ prisoner_is_awake
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_everyone_is_awake_and_pet_dog_is_present() {
+ let knight_is_awake = true;
+ let archer_is_awake = true;
+ let prisoner_is_awake = true;
+ let pet_dog_is_present = true;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_everyone_is_awake_and_pet_dog_is_absent() {
+ let knight_is_awake = true;
+ let archer_is_awake = true;
+ let prisoner_is_awake = true;
+ let pet_dog_is_present = false;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_free_prisoner_if_everyone_is_asleep_and_pet_dog_is_present() {
+ let knight_is_awake = false;
+ let archer_is_awake = false;
+ let prisoner_is_awake = false;
+ let pet_dog_is_present = true;
+ assert!(annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_everyone_is_asleep_and_pet_dog_is_absent() {
+ let knight_is_awake = false;
+ let archer_is_awake = false;
+ let prisoner_is_awake = false;
+ let pet_dog_is_present = false;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_free_prisoner_if_only_prisoner_is_awake_and_pet_dog_is_present() {
+ let knight_is_awake = false;
+ let archer_is_awake = false;
+ let prisoner_is_awake = true;
+ let pet_dog_is_present = true;
+ assert!(annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_free_prisoner_if_only_prisoner_is_awake_and_pet_dog_is_absent() {
+ let knight_is_awake = false;
+ let archer_is_awake = false;
+ let prisoner_is_awake = true;
+ let pet_dog_is_present = false;
+ assert!(annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_only_archer_is_awake_and_pet_dog_is_present() {
+ let knight_is_awake = false;
+ let archer_is_awake = true;
+ let prisoner_is_awake = false;
+ let pet_dog_is_present = true;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_only_archer_is_awake_and_pet_dog_is_absent() {
+ let knight_is_awake = false;
+ let archer_is_awake = true;
+ let prisoner_is_awake = false;
+ let pet_dog_is_present = false;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_free_prisoner_if_only_knight_is_awake_and_pet_dog_is_present() {
+ let knight_is_awake = true;
+ let archer_is_awake = false;
+ let prisoner_is_awake = false;
+ let pet_dog_is_present = true;
+ assert!(annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_only_knight_is_awake_and_pet_dog_is_absent() {
+ let knight_is_awake = true;
+ let archer_is_awake = false;
+ let prisoner_is_awake = false;
+ let pet_dog_is_present = false;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_only_knight_is_asleep_and_pet_dog_is_present() {
+ let knight_is_awake = false;
+ let archer_is_awake = true;
+ let prisoner_is_awake = true;
+ let pet_dog_is_present = true;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_only_knight_is_asleep_and_pet_dog_is_absent() {
+ let knight_is_awake = false;
+ let archer_is_awake = true;
+ let prisoner_is_awake = true;
+ let pet_dog_is_present = false;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn can_free_prisoner_if_only_archer_is_asleep_and_pet_dog_is_present() {
+ let knight_is_awake = true;
+ let archer_is_awake = false;
+ let prisoner_is_awake = true;
+ let pet_dog_is_present = true;
+ assert!(annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_only_archer_is_asleep_and_pet_dog_is_absent() {
+ let knight_is_awake = true;
+ let archer_is_awake = false;
+ let prisoner_is_awake = true;
+ let pet_dog_is_present = false;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_only_prisoner_is_asleep_and_pet_dog_is_present() {
+ let knight_is_awake = true;
+ let archer_is_awake = true;
+ let prisoner_is_awake = false;
+ let pet_dog_is_present = true;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}
+
+#[test]
+#[ignore]
+fn cannot_free_prisoner_if_only_prisoner_is_asleep_and_pet_dog_is_absent() {
+ let knight_is_awake = true;
+ let archer_is_awake = true;
+ let prisoner_is_awake = false;
+ let pet_dog_is_present = false;
+ assert!(!annalyns_infiltration::can_free_prisoner(
+ knight_is_awake,
+ archer_is_awake,
+ prisoner_is_awake,
+ pet_dog_is_present
+ ));
+}