Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions pawn.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace chess
{
pawn::can_move(const position_type& pos) const override
{
const color color_pawn = pawn.get_color();
const position_type pos = pawn.get_position();

if (color_pawn=='w')
{
if (pos[1]+1)
}

}

position (+1,0) ou (+2,0) si position =2 (w) ou 7(n) & si case vide
position = (+1,0) sinon et si case vide

position = (+1,1) si case non vide mais color � color(pawn)
}
12 changes: 12 additions & 0 deletions pawn.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

namespace chess
{
class pawn : public chess_piece
{
public:

bool can_move(const position_type& pos) const override;

};

}