13 lines
183 B
C++
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;
|
|
}
|