Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 15 / Chess / ChessBoard / ChessBoard.h
diff options
context:
space:
mode:
Commit9a86536fb579b244b29aa03fbefcce54746546dc (patch)
Author
 angeld55 <angel_dimitriev@abv.bg>
2021-06-12 19:02:26 +0300
Committer
 angeld55 <angel_dimitriev@abv.bg>
2021-06-12 19:02:26 +0300
Filescf5bce7cce7c692b111ac441e688f43b658f5bd3 /Sem. 15/Chess/ChessBoard/ChessBoard.h
Object-oriented_programming_FMI-9a86536fb579b244b29aa03fbefcce54746546dc.tar
Object-oriented_programming_FMI-9a86536fb579b244b29aa03fbefcce54746546dc.tar.gz
Object-oriented_programming_FMI-9a86536fb579b244b29aa03fbefcce54746546dc.zip
Parent9603d0847a01c555c2c9286294b3ccdea3e38be8 (diff)
fixes
1 files changed, 0 insertions, 43 deletions
-rw-r--r--Sem. 15/Chess/ChessBoard/ChessBoard.h43
diff --git a/Sem. 15/Chess/ChessBoard/ChessBoard.h b/Sem. 15/Chess/ChessBoard/ChessBoard.h
deleted file mode 100644
index e38acd5..0000000
--- a/Sem. 15/Chess/ChessBoard/ChessBoard.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#pragma once
-#include "../Figures/FigureBase/Figure.h"
-
-const size_t BOARD_SIZE = 8;
-class ChessBoard
-{
- struct Cell
- {
- Figure* f = nullptr;
- Cell() = default;
-
- Cell(const Cell& other) = delete;
- Cell& operator=(const Cell& other) = delete;
- bool isEmpty()
- {
- return f == nullptr;
- }
-
- void print() const
- {
- if (f != nullptr)
- f->print();
- else
- std::cout << ' ';
- }
-
- ~Cell()
- {
- delete f;
- }
- };
- Cell board[BOARD_SIZE][BOARD_SIZE];
-
-public:
- ChessBoard();
- ChessBoard(const ChessBoard& other) = delete;
- ChessBoard& operator=(const ChessBoard&) = delete;
-
- void print() const;
-
- void move(size_t x, size_t y, size_t destX, size_t destY);
-
-};