From 1c8fd0aa80ddcb1201f4ff1c78ef3168fc405091 Mon Sep 17 00:00:00 2001 From: textbrowser Date: Sun, 19 Jan 2025 10:50:07 -0500 Subject: [PATCH] 8 squares. --- Source/qtchess.cc | 2 +- Source/qtchess_communications.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/qtchess.cc b/Source/qtchess.cc index b2bab60..9a7422b 100644 --- a/Source/qtchess.cc +++ b/Source/qtchess.cc @@ -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) { diff --git a/Source/qtchess_communications.cc b/Source/qtchess_communications.cc index 792efd5..61c9064 100644 --- a/Source/qtchess_communications.cc +++ b/Source/qtchess_communications.cc @@ -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);