matthewJamesAbbott / Chess

A chess game that can be played in XWindows or Terminal
1 stars 0 forks source link

more bias against white this time in engine #26

Open matthewJamesAbbott opened 2 years ago

matthewJamesAbbott commented 2 years ago

code needs to be more politically correct and remember there are two colours to deal with here.

for(int i = 0; i < returnVector.size();){ testBoard = gameBoard; testBoard.setSquare(returnVector[i+2], returnVector[i+3],testBoard.returnSquare(returnVector[i], returnVector[i+1])); testBoard.setSquare(returnVector[i], returnVector[i+1], "Empty"); for (int e = 0; e < 8; e++){ for (int i2 = 0; i2 < 8; i2++){ if (testBoard.returnSquare(e, i2) == "Black King"){ kingX = e; kingY = i2; } } }

needs to be fixed.