From ded0a39de9e770413906d6cdcad7ba3cb4af7ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=E2=80=A2=C3=98=E2=80=A2R=E2=80=A2=C3=9C=E2=80=A2S?= Date: Wed, 16 Feb 2022 11:50:10 +0400 Subject: [PATCH 1/3] Make queen-attack clearer for non-chess players - Add an explanation for what B and W are (the queens) - Add examples of queens seeing each other, and not interacting. --- exercises/queen-attack/description.md | 35 ++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/exercises/queen-attack/description.md b/exercises/queen-attack/description.md index 4999d4fb95..fee653b18d 100644 --- a/exercises/queen-attack/description.md +++ b/exercises/queen-attack/description.md @@ -8,6 +8,7 @@ A chessboard can be represented by an 8 by 8 array. So if you are told the white queen is at `c5` (zero-indexed at column 2, row 3) and the black queen at `f2` (zero-indexed at column 5, row 6), then you know that the set-up is like so: +###### B and W are the queens, standing for Black and White. This is not relevant info to the puzzle. ```text a b c d e f g h 8 _ _ _ _ _ _ _ _ 8 @@ -22,4 +23,36 @@ So if you are told the white queen is at `c5` (zero-indexed at column 2, row 3) ``` You are 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. +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, which is why each queen +is labelled B and W; though you do not need to know which side +the queens are on to solve this challenge. From b3a73eefdb8434e090fa30836859c811634f0a93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=E2=80=A2=C3=98=E2=80=A2R=E2=80=A2=C3=9C=E2=80=A2S?= Date: Tue, 22 Feb 2022 18:43:37 +0400 Subject: [PATCH 2/3] Update description.md --- exercises/queen-attack/description.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/queen-attack/description.md b/exercises/queen-attack/description.md index fee653b18d..ce871ff5ec 100644 --- a/exercises/queen-attack/description.md +++ b/exercises/queen-attack/description.md @@ -52,7 +52,7 @@ _ _ _ _ _ _ _ _ _ _ B _ _ _ _ _ _ _ _ _ _ _ B _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ``` -B and W stand for **Black** and **White**, the two sides competing -against each other in a game of chess, which is why each queen -is labelled B and W; though you do not need to know which side -the queens are on to solve this challenge. +~~~~exercism/note +B and W are the queens, standing for Black and White. +This is not relevant info to the puzzle. +~~~~ From 03d7cdd3461c07f83b4c4f9d702496eb380b6047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=E2=80=A2=C3=98=E2=80=A2R=E2=80=A2=C3=9C=E2=80=A2S?= Date: Sat, 26 Feb 2022 09:44:54 +0400 Subject: [PATCH 3/3] Update desc as per community suggetsions --- exercises/queen-attack/description.md | 57 +++++++++++---------------- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/exercises/queen-attack/description.md b/exercises/queen-attack/description.md index ce871ff5ec..0069698228 100644 --- a/exercises/queen-attack/description.md +++ b/exercises/queen-attack/description.md @@ -8,50 +8,41 @@ A chessboard can be represented by an 8 by 8 array. So if you are told the white queen is at `c5` (zero-indexed at column 2, row 3) and the black queen at `f2` (zero-indexed at column 5, row 6), then you know that the set-up is like so: -###### B and W are the queens, standing for Black and White. This is not relevant info to the puzzle. ```text - a b c d e f g h -8 _ _ _ _ _ _ _ _ 8 -7 _ _ _ _ _ _ _ _ 7 -6 _ _ _ _ _ _ _ _ 6 -5 _ _ W _ _ _ _ _ 5 -4 _ _ _ _ _ _ _ _ 4 -3 _ _ _ _ _ _ _ _ 3 -2 _ _ _ _ _ B _ _ 2 -1 _ _ _ _ _ _ _ _ 1 - a b c d e f g h + a b c d e f g h a b c d e f g h a b c d e f g h +8 _ _ _ _ _ _ _ _ 8 8 _ _ _ _ _ _ _ _ 1 8 _ _ _ _ _ _ _ _ 8 +7 _ _ _ _ _ _ _ _ 7 7 _ _ _ _ _ _ _ _ 2 7 _ _ _ W _ _ _ _ 7 +6 _ _ _ W _ _ _ _ 6 6 _ B _ _ _ W _ _ 3 6 _ _ _ _ _ _ _ _ 6 +5 _ _ _ _ _ _ _ _ 5 5 _ _ _ _ _ _ _ _ 4 5 _ _ _ _ _ _ _ _ 5 +4 _ _ _ _ _ _ _ _ 4 4 _ _ _ _ _ _ _ _ 5 4 _ _ _ _ _ _ _ _ 4 +3 _ _ _ _ _ _ B _ 3 3 _ _ _ _ _ _ _ _ 6 3 _ _ _ _ _ _ _ _ 3 +2 _ _ _ _ _ _ _ _ 2 2 _ _ _ _ _ _ _ _ 7 2 _ _ _ B _ _ _ _ 2 +1 _ _ _ _ _ _ _ _ 1 1 _ _ _ _ _ _ _ _ 8 1 _ _ _ _ _ _ _ _ 1 + a b c d e f g h a b c d e f g h a b c d e f g h +``` ``` You are 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: +In this case, that answer would be yes; they can, because both pieces share a diagonal, row, or column. -```text -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ W _ _ _ _ -_ _ _ W _ _ _ _ _ B _ _ _ W _ _ _ _ _ _ _ _ _ _ -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -_ _ _ _ _ _ B _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ B _ _ _ _ -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -``` ### Examples of queens not interacting: ```text - -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ W _ _ _ _ -_ _ _ _ _ _ _ _ _ _ _ _ _ W _ _ _ _ _ _ _ _ _ _ -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -_ _ _ _ W _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -_ _ _ _ _ _ B _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -_ _ _ _ _ _ _ _ _ _ B _ _ _ _ _ _ _ _ _ _ _ B _ -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + a b c d e f g h a b c d e f g h a b c d e f g h +8 _ _ _ _ _ _ _ _ 8 8 _ _ _ _ _ _ _ _ 8 8 _ _ _ _ _ _ _ _ 8 +7 _ _ _ _ _ _ _ _ 7 7 _ _ _ _ _ _ _ _ 7 7 _ _ _ W _ _ _ _ 7 +6 _ _ _ _ _ _ _ _ 6 6 _ _ _ _ _ W _ _ 6 6 _ _ _ _ _ _ _ _ 6 +5 _ _ _ _ _ _ _ _ 5 5 _ _ _ _ _ _ _ _ 5 5 _ _ _ _ _ _ _ _ 5 +4 _ _ _ _ W _ _ _ 4 4 _ _ _ _ _ _ _ _ 4 4 _ _ _ _ _ _ _ _ 4 +3 _ _ _ _ _ _ B _ 3 3 _ _ _ _ _ _ _ _ 3 3 _ _ _ _ _ _ _ _ 3 +2 _ _ _ _ _ _ _ _ 2 2 _ _ B _ _ _ _ _ 2 2 _ _ _ _ _ _ B _ 2 +1 _ _ _ _ _ _ _ _ 1 1 _ _ _ _ _ _ _ _ 1 1 _ _ _ _ _ _ _ _ 1 + a b c d e f g h a b c d e f g h a b c d e f g h ``` +In all of these examples, we can see that the queens are not on the same diagonal, row, or column, so they cannot see each other. + ~~~~exercism/note B and W are the queens, standing for Black and White. This is not relevant info to the puzzle.