Commit c8c72bc0 authored by AlaskaLinuxUser's avatar AlaskaLinuxUser

Added promotion input from movepos.

parent e16dcd78
......@@ -91,6 +91,15 @@ vector<string> sepVect = split(boardPositions, ' ');
int first =((sepVect[k].at(0) - 'a' + 1) + (((sepVect[k].at(1) - '1') * 8) - 1));
int second =((sepVect[k].at(2) - 'a' + 1) + (((sepVect[k].at(3) - '1') * 8) - 1));
m_theBoard[second] = m_theBoard[first];
if (sepVect[k].size() == 5) {
char newPiece = '-';
if (!m_whitesTurn) {
newPiece = sepVect[k].at(4);
} else {
newPiece = toupper(sepVect[k].at(4));
}
m_theBoard[second] = newPiece;
}
m_theBoard[first] = '-';
if (first == 4) {m_Kcastle = false; m_Qcastle = false;}
if (first == 60) {m_kcastle = false; m_qcastle = false;}
......
File added
......@@ -843,7 +843,8 @@ string Moves::bishopMovesB(string boardPositions, int i) {
for(int l=0; (unsigned)l<theseMoves.size();l++) {
int k = theseMoves[l];
if (islower(theBoard[k]) || theBoard[k] == '-') {
//cout << theseMoves[l] << endl;
if (isupper(theBoard[k]) || theBoard[k] == '-') {
moveSquare = theBoard[k];
theBoard[k] = 'k';
theBoard[i] = '-';
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment