@@ -26,21 +26,21 @@ class QueenAttackCalculator {
2626
2727## Explanation
2828
29- 1 . ** Constructor** :
29+ ### Constructor
3030
31- The constructor takes two ` Queen ` objects, ` queen1 ` and ` queen2 ` , and stores them as instance variables after validating the following conditions:
31+ The constructor takes two ` Queen ` objects, ` queen1 ` and ` queen2 ` , and stores them as instance variables after validating the following conditions:
3232
33- - If either queen is ` null ` .
34- - If both queens occupy the same position.
33+ - Either queen is ` null ` .
34+ - Both queens occupy the same position.
3535
36- If either of these conditions is true, an exception is thrown.
36+ If either of these conditions is true, an exception is thrown.
3737
38- 2 . ** Method ( ` canQueensAttackOneAnother ` ) ** :
38+ ### ` canQueensAttackOneAnother ` Method
3939
40- This method calculates the row and column differences between the two queens and checks the following conditions:
40+ This method calculates the row and column differences between the two queens and checks the following conditions:
4141
42- - If the row difference is zero (the queens are on the same row).
43- - If the column difference is zero (the queens are on the same column).
44- - If the row and column differences are equal (the queens are on the same diagonal).
42+ - The row difference is zero (the queens are on the same row).
43+ - The column difference is zero (the queens are on the same column).
44+ - The row and column differences are equal (the queens are on the same diagonal).
4545
46- If any of these conditions are true, the method returns ` true ` , indicating that the queens can attack each other.
46+ If any of these conditions are true, the method returns ` true ` , indicating that the queens can attack each other.
0 commit comments