Website Summary Files Commits Branches @commit @diff @stats
path: root / DiamondProblemAndPolymorphism / Chess
diff options
context:
space:
mode:
Commit027a3c0cd2f1b0744b413afd3bf59487f1622b11 (patch)
Author
 Angeld55 <achi_d@abv.bg>
2019-09-21 12:12:31 +0300
Committer
 GitHub <noreply@github.com>
2019-09-21 12:12:31 +0300
Files76db80d7a23a81b1fd46aa5130a8bdcadeb35882 /DiamondProblemAndPolymorphism/Chess
Object-oriented_programming_FMI-027a3c0cd2f1b0744b413afd3bf59487f1622b11.tar
Object-oriented_programming_FMI-027a3c0cd2f1b0744b413afd3bf59487f1622b11.tar.gz
Object-oriented_programming_FMI-027a3c0cd2f1b0744b413afd3bf59487f1622b11.zip
Parent788bb1e6b448ed093feac318e5c1e0986becdc24 (diff)
Update Queen.hpp
1 files changed, 3 insertions, 3 deletions
-rw-r--r--DiamondProblemAndPolymorphism/Chess/Queen.hpp6
diff --git a/DiamondProblemAndPolymorphism/Chess/Queen.hpp b/DiamondProblemAndPolymorphism/Chess/Queen.hpp
index 84ce90e..70c8e15 100644
--- a/DiamondProblemAndPolymorphism/Chess/Queen.hpp
+++ b/DiamondProblemAndPolymorphism/Chess/Queen.hpp
@@ -1,7 +1,7 @@
#include "Figure.hpp"
-class Queen : public Bishop, public Rook
-{
+class Queen : public Bishop, public Rook //Формално това НЕ Е ок. Понеже царицата НЕ Е топ и царицата НЕ Е офицер.
+{
public:
Queen(int xCoordinate, int yCoordinate, bool isWhite) :Figure(xCoordinate, yCoordinate, isWhite), Bishop(xCoordinate, yCoordinate, isWhite), Rook(xCoordinate, yCoordinate, isWhite)
{}
@@ -19,4 +19,4 @@ bool Queen::Move(int xNew, int yNew) // Тук сме наследили 2 фуÐ
if (res) //Ако е успял - вс е ок
return true;
return Bishop::Move(xNew, yNew); //Ако не си успял като топ, пробвай като офицер.
-} \ No newline at end of file
+}