From ddea7e44d2b8c798d62f36f98bb3315e548ea783 Mon Sep 17 00:00:00 2001 From: jagdish-15 Date: Tue, 19 Nov 2024 22:23:07 +0530 Subject: [PATCH 1/3] Update exercises/practice/queen-attack/.approaches/introduction.md Co-authored-by: Kah Goh --- exercises/practice/queen-attack/.approaches/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/practice/queen-attack/.approaches/introduction.md b/exercises/practice/queen-attack/.approaches/introduction.md index bec2a4d29..c6a4c77c3 100644 --- a/exercises/practice/queen-attack/.approaches/introduction.md +++ b/exercises/practice/queen-attack/.approaches/introduction.md @@ -1,4 +1,4 @@ -# Queen Attack Exercise +# Introduction In this exercise, we determine if two queens on a chessboard can attack each other based on their positions. A queen in chess can move any number of squares horizontally, vertically, or diagonally. From ec9e1e22316b4d1c02d7a63be660db9babb3c8f0 Mon Sep 17 00:00:00 2001 From: jagdish-15 Date: Tue, 19 Nov 2024 22:23:18 +0530 Subject: [PATCH 2/3] Update exercises/practice/queen-attack/.approaches/introduction.md Co-authored-by: Kah Goh --- exercises/practice/queen-attack/.approaches/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/practice/queen-attack/.approaches/introduction.md b/exercises/practice/queen-attack/.approaches/introduction.md index c6a4c77c3..460d792bf 100644 --- a/exercises/practice/queen-attack/.approaches/introduction.md +++ b/exercises/practice/queen-attack/.approaches/introduction.md @@ -4,7 +4,7 @@ In this exercise, we determine if two queens on a chessboard can attack each oth A queen in chess can move any number of squares horizontally, vertically, or diagonally. The task is to check if two queens, placed on specific coordinates, can attack each other. -## Genral Advice +## General Guidance The problem boils down to checking three conditions: From a4d74388f79f8c55a21385659ad88c555803cb0f Mon Sep 17 00:00:00 2001 From: jagdish-15 Date: Tue, 19 Nov 2024 22:26:12 +0530 Subject: [PATCH 3/3] Update exercises/practice/queen-attack/.approaches/simple-comparison/content.md Co-authored-by: Kah Goh --- .../queen-attack/.approaches/simple-comparison/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/practice/queen-attack/.approaches/simple-comparison/content.md b/exercises/practice/queen-attack/.approaches/simple-comparison/content.md index a29d18e92..b996933bb 100644 --- a/exercises/practice/queen-attack/.approaches/simple-comparison/content.md +++ b/exercises/practice/queen-attack/.approaches/simple-comparison/content.md @@ -67,7 +67,7 @@ class QueenAttackCalculator { 1. **Constructor**: - In the constructor of `QueenAttackCalculator`, we check if the queens are positioned at valid places. + The constructor of `QueenAttackCalculator` takes two `Queen` objects and checks if they are positioned at valid places. If either queen is `null`, or if both queens occupy the same position, an exception is thrown. The constructor takes two `Queen` objects, `queen1` and `queen2`, and stores them as instance variables.