Files
nchess-cpp/king.cpp
2014-09-30 17:09:22 +03:00

13 lines
183 B
C++

#include "king.h"
void king::move(int x, int y)
{
this->x = x;
this->y = y;
}
bool king::can_castle(int choice)
{
return choice == 1 ? !castled_left : !castled_right;
}