Website Summary Files Commits Branches @commit @diff @stats
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
Object-oriented_programming_FMI-9a86536fb579b244b29aa03fbefcce54746546dc.tar
Object-oriented_programming_FMI-9a86536fb579b244b29aa03fbefcce54746546dc.tar.gz
Object-oriented_programming_FMI-9a86536fb579b244b29aa03fbefcce54746546dc.zip
Parent9603d0847a01c555c2c9286294b3ccdea3e38be8 (diff)
fixes
23 files changed, 20 insertions, 7 deletions
-rw-r--r--Exams/poll.txt1
-rw-r--r--Exams/schedule.md8
-rw-r--r--Sem. 15/Chess_basic_prototype/ChessBoard/ChessBoard.cpp (renamed from Sem. 15/Chess/ChessBoard/ChessBoard.cpp)7
-rw-r--r--Sem. 15/Chess_basic_prototype/ChessBoard/ChessBoard.h (renamed from Sem. 15/Chess/ChessBoard/ChessBoard.h)2
-rw-r--r--Sem. 15/Chess_basic_prototype/ConfigEnums/ConfigEnums.h (renamed from Sem. 15/Chess/ConfigEnums/ConfigEnums.h)0
-rw-r--r--Sem. 15/Chess_basic_prototype/FigureFactory/FigureFactory.cpp (renamed from Sem. 15/Chess/FigureFactory/FigureFactory.cpp)0
-rw-r--r--Sem. 15/Chess_basic_prototype/FigureFactory/FigureFactory.h (renamed from Sem. 15/Chess/FigureFactory/FigureFactory.h)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Bishop/Bishop.cpp (renamed from Sem. 15/Chess/Figures/Bishop/Bishop.cpp)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Bishop/Bishop.h (renamed from Sem. 15/Chess/Figures/Bishop/Bishop.h)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/FigureBase/Figure.cpp (renamed from Sem. 15/Chess/Figures/FigureBase/Figure.cpp)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/FigureBase/Figure.h (renamed from Sem. 15/Chess/Figures/FigureBase/Figure.h)1
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/King/King.cpp (renamed from Sem. 15/Chess/Figures/King/King.cpp)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/King/King.h (renamed from Sem. 15/Chess/Figures/King/King.h)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Knight/Knight.cpp (renamed from Sem. 15/Chess/Figures/Knight/Knight.cpp)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Knight/Knight.h (renamed from Sem. 15/Chess/Figures/Knight/Knight.h)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Pawn/Pawn.cpp (renamed from Sem. 15/Chess/Figures/Pawn/Pawn.cpp)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Pawn/Pawn.h (renamed from Sem. 15/Chess/Figures/Pawn/Pawn.h)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Queen/Queen.cpp (renamed from Sem. 15/Chess/Figures/Queen/Queen.cpp)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Queen/Queen.h (renamed from Sem. 15/Chess/Figures/Queen/Queen.h)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Rook/Rook.cpp (renamed from Sem. 15/Chess/Figures/Rook/Rook.cpp)0
-rw-r--r--Sem. 15/Chess_basic_prototype/Figures/Rook/Rook.h (renamed from Sem. 15/Chess/Figures/Rook/Rook.h)0
-rw-r--r--Sem. 15/Chess_basic_prototype/main.cpp (renamed from Sem. 15/Chess/main.cpp)2
-rw-r--r--Sem. 16/LogicExpressions/Source.cpp6
diff --git a/Exams/poll.txt b/Exams/poll.txt
new file mode 100644
index 0000000..4ffc75f
--- /dev/null
+++ b/Exams/poll.txt
@@ -0,0 +1 @@
+https://forms.gle/2ciPStWkxz319C8k9
diff --git a/Exams/schedule.md b/Exams/schedule.md
new file mode 100644
index 0000000..10f8757
--- /dev/null
+++ b/Exams/schedule.md
@@ -0,0 +1,8 @@
+Дати:
+
+ - 29.06
+ - 01.07
+ - 02.07
+
+[Анкета за ден за събеседване](https://forms.gle/2ciPStWkxz319C8k9)
+
diff --git a/Sem. 15/Chess/ChessBoard/ChessBoard.cpp b/Sem. 15/Chess_basic_prototype/ChessBoard/ChessBoard.cpp
index 2c618bd..ed9823d 100644
--- a/Sem. 15/Chess/ChessBoard/ChessBoard.cpp
+++ b/Sem. 15/Chess_basic_prototype/ChessBoard/ChessBoard.cpp
@@ -35,6 +35,7 @@ ChessBoard::ChessBoard()
void ChessBoard::print() const
{
+ std::cout << "--------" << std::endl;
for (int i = 0; i < BOARD_SIZE; i++)
{
for (int j = 0; j < BOARD_SIZE; j++)
@@ -43,21 +44,23 @@ void ChessBoard::print() const
}
std::cout << std::endl;
}
+ std::cout << "--------" << std::endl << std::endl << std::endl;
}
-void ChessBoard::move(size_t x, size_t y, size_t destX, size_t destY)
+void ChessBoard::moveFigure(size_t x, size_t y, size_t destX, size_t destY)
{
Figure* current = board[x][y].f;
if (current->getType() == PawnFigure)
{
- //Some logic.....
+ //Some other logic..... El'passant and other
}
else
{
if (board[x][y].f && board[x][y].f->canBeMoved(x, y, destX, destY))
{
+ delete board[destX][destY].f;
board[destX][destY].f = board[x][y].f;
board[x][y].f = nullptr;
}
diff --git a/Sem. 15/Chess/ChessBoard/ChessBoard.h b/Sem. 15/Chess_basic_prototype/ChessBoard/ChessBoard.h
index e38acd5..315e492 100644
--- a/Sem. 15/Chess/ChessBoard/ChessBoard.h
+++ b/Sem. 15/Chess_basic_prototype/ChessBoard/ChessBoard.h
@@ -38,6 +38,6 @@ public:
void print() const;
- void move(size_t x, size_t y, size_t destX, size_t destY);
+ void moveFigure(size_t x, size_t y, size_t destX, size_t destY);
};
diff --git a/Sem. 15/Chess/ConfigEnums/ConfigEnums.h b/Sem. 15/Chess_basic_prototype/ConfigEnums/ConfigEnums.h
index c3448e8..c3448e8 100644
--- a/Sem. 15/Chess/ConfigEnums/ConfigEnums.h
+++ b/Sem. 15/Chess_basic_prototype/ConfigEnums/ConfigEnums.h
diff --git a/Sem. 15/Chess/FigureFactory/FigureFactory.cpp b/Sem. 15/Chess_basic_prototype/FigureFactory/FigureFactory.cpp
index e9db605..e9db605 100644
--- a/Sem. 15/Chess/FigureFactory/FigureFactory.cpp
+++ b/Sem. 15/Chess_basic_prototype/FigureFactory/FigureFactory.cpp
diff --git a/Sem. 15/Chess/FigureFactory/FigureFactory.h b/Sem. 15/Chess_basic_prototype/FigureFactory/FigureFactory.h
index 012a60c..012a60c 100644
--- a/Sem. 15/Chess/FigureFactory/FigureFactory.h
+++ b/Sem. 15/Chess_basic_prototype/FigureFactory/FigureFactory.h
diff --git a/Sem. 15/Chess/Figures/Bishop/Bishop.cpp b/Sem. 15/Chess_basic_prototype/Figures/Bishop/Bishop.cpp
index 786c9eb..786c9eb 100644
--- a/Sem. 15/Chess/Figures/Bishop/Bishop.cpp
+++ b/Sem. 15/Chess_basic_prototype/Figures/Bishop/Bishop.cpp
diff --git a/Sem. 15/Chess/Figures/Bishop/Bishop.h b/Sem. 15/Chess_basic_prototype/Figures/Bishop/Bishop.h
index 86949a7..86949a7 100644
--- a/Sem. 15/Chess/Figures/Bishop/Bishop.h
+++ b/Sem. 15/Chess_basic_prototype/Figures/Bishop/Bishop.h
diff --git a/Sem. 15/Chess/Figures/FigureBase/Figure.cpp b/Sem. 15/Chess_basic_prototype/Figures/FigureBase/Figure.cpp
index e69de29..e69de29 100644
--- a/Sem. 15/Chess/Figures/FigureBase/Figure.cpp
+++ b/Sem. 15/Chess_basic_prototype/Figures/FigureBase/Figure.cpp
diff --git a/Sem. 15/Chess/Figures/FigureBase/Figure.h b/Sem. 15/Chess_basic_prototype/Figures/FigureBase/Figure.h
index 3e0bc07..9e2300a 100644
--- a/Sem. 15/Chess/Figures/FigureBase/Figure.h
+++ b/Sem. 15/Chess_basic_prototype/Figures/FigureBase/Figure.h
@@ -10,6 +10,7 @@ class Figure
public:
Figure(bool isWhite, FigureType type) :isWhite(isWhite), type(type)
{}
+
virtual bool canBeMoved(size_t currentX, size_t currentY, size_t destX, size_t destY) const = 0;
virtual void print() const = 0;
diff --git a/Sem. 15/Chess/Figures/King/King.cpp b/Sem. 15/Chess_basic_prototype/Figures/King/King.cpp
index 8ca67e8..8ca67e8 100644
--- a/Sem. 15/Chess/Figures/King/King.cpp
+++ b/Sem. 15/Chess_basic_prototype/Figures/King/King.cpp
diff --git a/Sem. 15/Chess/Figures/King/King.h b/Sem. 15/Chess_basic_prototype/Figures/King/King.h
index 85a8e02..85a8e02 100644
--- a/Sem. 15/Chess/Figures/King/King.h
+++ b/Sem. 15/Chess_basic_prototype/Figures/King/King.h
diff --git a/Sem. 15/Chess/Figures/Knight/Knight.cpp b/Sem. 15/Chess_basic_prototype/Figures/Knight/Knight.cpp
index 5713d7c..5713d7c 100644
--- a/Sem. 15/Chess/Figures/Knight/Knight.cpp
+++ b/Sem. 15/Chess_basic_prototype/Figures/Knight/Knight.cpp
diff --git a/Sem. 15/Chess/Figures/Knight/Knight.h b/Sem. 15/Chess_basic_prototype/Figures/Knight/Knight.h
index 72acfea..72acfea 100644
--- a/Sem. 15/Chess/Figures/Knight/Knight.h
+++ b/Sem. 15/Chess_basic_prototype/Figures/Knight/Knight.h
diff --git a/Sem. 15/Chess/Figures/Pawn/Pawn.cpp b/Sem. 15/Chess_basic_prototype/Figures/Pawn/Pawn.cpp
index 347032b..347032b 100644
--- a/Sem. 15/Chess/Figures/Pawn/Pawn.cpp
+++ b/Sem. 15/Chess_basic_prototype/Figures/Pawn/Pawn.cpp
diff --git a/Sem. 15/Chess/Figures/Pawn/Pawn.h b/Sem. 15/Chess_basic_prototype/Figures/Pawn/Pawn.h
index 675bf0b..675bf0b 100644
--- a/Sem. 15/Chess/Figures/Pawn/Pawn.h
+++ b/Sem. 15/Chess_basic_prototype/Figures/Pawn/Pawn.h
diff --git a/Sem. 15/Chess/Figures/Queen/Queen.cpp b/Sem. 15/Chess_basic_prototype/Figures/Queen/Queen.cpp
index 0e33198..0e33198 100644
--- a/Sem. 15/Chess/Figures/Queen/Queen.cpp
+++ b/Sem. 15/Chess_basic_prototype/Figures/Queen/Queen.cpp
diff --git a/Sem. 15/Chess/Figures/Queen/Queen.h b/Sem. 15/Chess_basic_prototype/Figures/Queen/Queen.h
index c4fb1da..c4fb1da 100644
--- a/Sem. 15/Chess/Figures/Queen/Queen.h
+++ b/Sem. 15/Chess_basic_prototype/Figures/Queen/Queen.h
diff --git a/Sem. 15/Chess/Figures/Rook/Rook.cpp b/Sem. 15/Chess_basic_prototype/Figures/Rook/Rook.cpp
index 2cb96a3..2cb96a3 100644
--- a/Sem. 15/Chess/Figures/Rook/Rook.cpp
+++ b/Sem. 15/Chess_basic_prototype/Figures/Rook/Rook.cpp
diff --git a/Sem. 15/Chess/Figures/Rook/Rook.h b/Sem. 15/Chess_basic_prototype/Figures/Rook/Rook.h
index f6190a8..f6190a8 100644
--- a/Sem. 15/Chess/Figures/Rook/Rook.h
+++ b/Sem. 15/Chess_basic_prototype/Figures/Rook/Rook.h
diff --git a/Sem. 15/Chess/main.cpp b/Sem. 15/Chess_basic_prototype/main.cpp
index 12ad76d..6673ec8 100644
--- a/Sem. 15/Chess/main.cpp
+++ b/Sem. 15/Chess_basic_prototype/main.cpp
@@ -10,7 +10,7 @@ int main()
c.print();
- c.move(0, 1, 2, 0);
+ c.moveFigure(0, 1, 2, 0);
c.print();
} \ No newline at end of file
diff --git a/Sem. 16/LogicExpressions/Source.cpp b/Sem. 16/LogicExpressions/Source.cpp
index 2b810b8..af86b62 100644
--- a/Sem. 16/LogicExpressions/Source.cpp
+++ b/Sem. 16/LogicExpressions/Source.cpp
@@ -2,14 +2,14 @@
using namespace LogicExpressions;
-
+// or |, and ^, negation !, implies >, iff -
int main()
{
- LogicExpr* expr = new Operation(new Var('p'), '|', new Negation(new Var('p'))); // p & !p
+ LogicExpr* expr = new Operation(new Var('p'), '|', new Negation(new Var('p'))); // p | !p
expr->print();
cout << " " << isTautology(expr, { 'p' }) << endl;
LogicExpr* expr2 = new Operation(new Var('q'),'^',new Operation(new Var('p'), '^', new Negation(new Var('p')))); // q ^ (p ^ !p)
expr2->print();
- cout << " " << isContradiction(expr2, { 'p', 'q' });
+ cout << " " << isContradiction(expr2, { 'p', 'q' }) << endl;
} \ No newline at end of file