Remove unused variables, and justin's old bishop code

master
Tait Hoyem 5 years ago
parent 5cb6d225b7
commit d76f2f13ef

@ -46,8 +46,6 @@ std::vector<Position> get_all_moves(Position pn, std::array<PieceType, 64> board
std::vector<Position> pns;
int x = pos_to_pair(pn).first;
int y = pos_to_pair(pn).second;
int dx;
int dy;
switch(pt){
case PieceType::B_ROOK:
case PieceType::W_ROOK:
@ -75,35 +73,7 @@ std::vector<Position> get_all_moves(Position pn, std::array<PieceType, 64> board
break;
}
}
/*
if (((i>x) && (i<8)) && ((j>y) && (j<8)))
{
dx = i-x;
dy = j-y;
if (dx == dy){pns.push_back(pair_to_pos(std::make_pair(x+dx,y+dy)));}
}
if (((i>=0) && (i<x)) && ((j>y) && (j<8)))
{
dx = i+1;
dy = j-y;
if (dx == dy){pns.push_back(pair_to_pos(std::make_pair(x-dx,y+dy)));}
}
if (((i>=0) && (i<x)) && ((j>=0) && (j<y)))
{
dx = i+1;
dy = j+1;
if (dx == dy){pns.push_back(pair_to_pos(std::make_pair(x-dx,y-dy)));}
}
if (((i>x) && (i<8)) && ((j>=0) && (j<y)))
{
dx = i-x;
dy = j+1;
if (dx == dy){pns.push_back(pair_to_pos(std::make_pair(x+dx,y-dy)));}
}
if ((i==x) && (j==y))
{
pns.push_back(pair_to_pos(std::make_pair(x,y)));
}*/
}
}
break;

Loading…
Cancel
Save