TurboSchach/Pawn.cpp

36 lines
675 B
C++
Raw Normal View History

//
// Created by hamac on 19.12.2024.
//
2024-12-19 13:23:57 +00:00
#include <string>
#include <vector>
#include <iostream>
#include "Chesspiece.cpp"
class Pawn: public Chesspiece {
private:
/* fields */
bool firstMove = true;
bool movedTwoFields = false;
/* methods */
std::vector<std::string> calcAvaibleMoves() override {
std::pair<int, int> pos = getPosition();
std::vector<std::string> moves;
if (firstMove) {
//moves.
}
std::cout << "Hello World!\n" << std::endl;
return moves;
}
public:
Pawn(char color, std::pair<int, int> position) : Chesspiece() {
setPosition(position);
setColor(color);
}
};