From f1e6772e0b264388cf96500b75c6ae47272f2238 Mon Sep 17 00:00:00 2001 From: angeld55 Date: Tue, 7 Jun 2022 21:18:29 +0300 Subject: sem 15 --- Sem. 14/Chess_basic_prototype/ChessBoard/ChessBoard.cpp | 2 +- Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.cpp | 1 - Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'Sem. 14') diff --git a/Sem. 14/Chess_basic_prototype/ChessBoard/ChessBoard.cpp b/Sem. 14/Chess_basic_prototype/ChessBoard/ChessBoard.cpp index ed9823d..70276df 100644 --- a/Sem. 14/Chess_basic_prototype/ChessBoard/ChessBoard.cpp +++ b/Sem. 14/Chess_basic_prototype/ChessBoard/ChessBoard.cpp @@ -60,7 +60,7 @@ void ChessBoard::moveFigure(size_t x, size_t y, size_t destX, size_t destY) { if (board[x][y].f && board[x][y].f->canBeMoved(x, y, destX, destY)) { - delete board[destX][destY].f; + delete board[destX][destY].f; //взимане на фигура board[destX][destY].f = board[x][y].f; board[x][y].f = nullptr; } diff --git a/Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.cpp b/Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.cpp index 4d94406..e69de29 100644 --- a/Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.cpp +++ b/Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.cpp @@ -1 +0,0 @@ -todo \ No newline at end of file diff --git a/Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.h b/Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.h index 9e2300a..53bbf85 100644 --- a/Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.h +++ b/Sem. 14/Chess_basic_prototype/Figures/FigureBase/Figure.h @@ -17,5 +17,5 @@ public: bool getIsWhite() const { return isWhite; }; FigureType getType() const { return type; } - virtual ~Figure(){}; + virtual ~Figure() = default; }; \ No newline at end of file -- cgit v1.3.1-23-gd82d