Website Summary Files Commits Branches @commit @diff @stats
path: root / DiamondProblemAndPolymorphism / Chess / Rook.hpp
diff options
context:
space:
mode:
1 files changed, 0 insertions, 31 deletions
-rw-r--r--DiamondProblemAndPolymorphism/Chess/Rook.hpp31
diff --git a/DiamondProblemAndPolymorphism/Chess/Rook.hpp b/DiamondProblemAndPolymorphism/Chess/Rook.hpp
deleted file mode 100644
index d973870..0000000
--- a/DiamondProblemAndPolymorphism/Chess/Rook.hpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#pragma once
-#include "Figure.hpp"
-
-class Rook : virtual public Figure
-{
-
-public:
- Rook(int xCoordinate, int yCoordinate, bool isWhite) :Figure(xCoordinate, yCoordinate, isWhite)
- {}
-
- bool Move(int xNew, int yNew);
-
- void Print();
-
-};
-
-bool Rook::Move(int xNew, int yNew)
-{
- if (!isValidCoord(xNew, yNew))
- return false;
- if (!(xCoord == xNew ^ yCoord == yNew))
- return false;
- xCoord = xNew;
- yCoord = yNew;
- return true;
-}
-
-void Rook::Print()
-{
- cout << 'R';
-} \ No newline at end of file