From bea3f2ee3a313049c3513b3eedf5cb6519f19729 Mon Sep 17 00:00:00 2001 From: zedarider Date: Thu, 24 Nov 2016 17:51:57 +0000 Subject: old changes --- include/chess_ai.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/chess_ai.hpp') diff --git a/include/chess_ai.hpp b/include/chess_ai.hpp index c682bd2..2984d49 100644 --- a/include/chess_ai.hpp +++ b/include/chess_ai.hpp @@ -3,8 +3,8 @@ #define CHESS_BOARD_SIZE 8 -#include #include +#include #include namespace chess_ai { @@ -150,6 +150,13 @@ namespace chess_ai { // overload ++ operator for pawns chess_piece& operator++() { + if(this->type == pawn) { + if(this->colour == white) { + --pawn->y; + } else { + ++pawn->y; + } + } return *this; } -- cgit