Skip to content

Commit

Permalink
Rust: Update queen-attack instructions to be clearer for non-chess pl…
Browse files Browse the repository at this point in the history
…ayers (exercism#1449)

* Rust: Update queen-attack instructions to be clearer for non-chess players.

Included extra examples of when queens can see each other, and when they cannot; and also added an explanation for why the queens are labelled B and W to help alleviate user confusion.

* Update exercises/practice/queen-attack/.docs/instructions.md

Co-authored-by: Peter Goodspeed-Niklaus <[email protected]>

* Update exercises/practice/queen-attack/.docs/instructions.md

Co-authored-by: Peter Goodspeed-Niklaus <[email protected]>

Co-authored-by: Peter Goodspeed-Niklaus <[email protected]>
  • Loading branch information
mahmoud-moursy and coriolinus authored Mar 5, 2022
1 parent 4571738 commit 5bcb3ec
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions exercises/practice/queen-attack/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,34 @@ _ _ _ _ _ _ _ _
You'd also be able to answer whether the queens can attack each other.
In this case, that answer would be yes, they can, because both pieces
share a diagonal.

### Examples of queens attacking:

```text
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ W _ _ _ _
_ _ _ W _ _ _ _ _ B _ _ _ W _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ B _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ B _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
```

### Examples of queens not interacting:

```text
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ W _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ W _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ W _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ B _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ B _ _ _ _ _ _ _ _ _ _ _ B _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
```

B and W stand for **Black** and **White**, the two sides competing
against each other in a game of chess. For this exercise you do not need to know which side
the queens are on.

0 comments on commit 5bcb3ec

Please sign in to comment.