if (pieces[1].contains(s.name())) {
to = s;
}
}
if (!move.contains("=")) {
return new CMove(from, to);
}
move = move.toLowerCase();
if (move.contains("1")) {
if (move.contains("=q")) {
return new CMove(from, to, EPiece.WQ);
}
if (move.contains("=r")) {
return new CMove(from, to, EPiece.WR);
}
if (move.contains("=b")) {
return new CMove(from, to, EPiece.WB);
}
if (move.contains("=n")) {
return new CMove(from, to, EPiece.WN);
}
} else {
if (move.contains("=q")) {
return new CMove(from, to, EPiece.BQ);
}
if (move.contains("=r")) {
return new CMove(from, to, EPiece.BR);
}
if (move.contains("=b")) {
return new CMove(from, to, EPiece.BB);
}
if (move.contains("=n")) {
return new CMove(from, to, EPiece.BN);
}
}
return null;
}