Skip to content

Commit

Permalink
8 squares.
Browse files Browse the repository at this point in the history
  • Loading branch information
textbrowser committed Jan 19, 2025
1 parent 2532cbc commit 1c8fd0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/qtchess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void qtchess::update_board(const QByteArray &buffer)

void qtchess::update_board(const QString &move, const QStringList &state)
{
if(state.size() == 8)
if(NSQUARES == state.size())
{
if(gui)
{
Expand Down
3 changes: 2 additions & 1 deletion Source/qtchess_communications.cc
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,8 @@ void qtchess_communications::slot_read_gnuchess_output(void)
auto const list(m_gnuchess_data.split('\n'));

for(int i = 0; i < list.size(); i++)
if(list.at(i).count(' ') == 8 && list.at(i).length() == 16)
if(NSQUARES + NSQUARES == list.at(i).length() &&
NSQUARES == list.at(i).count(' '))
state << list.at(i).trimmed();
else if(list.at(i).trimmed().startsWith("My move is : "))
move = list.at(i);
Expand Down

0 comments on commit 1c8fd0a

Please sign in to comment.