From 9a86536fb579b244b29aa03fbefcce54746546dc Mon Sep 17 00:00:00 2001 From: angeld55 Date: Sat, 12 Jun 2021 19:02:26 +0300 Subject: fixes --- Sem. 15/Chess/ChessBoard/ChessBoard.h | 43 ----------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 Sem. 15/Chess/ChessBoard/ChessBoard.h (limited to 'Sem. 15/Chess/ChessBoard/ChessBoard.h') 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); - -}; -- cgit v1.3.1-23-gd82d