[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bknights=5D_src/proto=3A_Remove_delay_code_from_XBoa?=
From: Miha Čančula <miha.cancula () gmail ! com>
Date: 2011-02-13 16:23:37
Message-ID: 20110213162337.B88F8A60E3 () git ! kde ! org
[Download RAW message or body]
Git commit 91ad89fb17d1551b5bd00fbd3776ead292382950 by Miha Čančula.
Committed on 13/02/2011 at 12:08.
Pushed by mihac into branch 'master'.
Remove delay code from XBoardProtocol, the computer engine's game state should not \
differ from Knights'.
M +1 -8 src/proto/xboardproto.cpp
M +0 -2 src/proto/xboardproto.h
http://commits.kde.org/knights/91ad89fb17d1551b5bd00fbd3776ead292382950
diff --git a/src/proto/xboardproto.cpp b/src/proto/xboardproto.cpp
index a26cda2..39714f4 100644
--- a/src/proto/xboardproto.cpp
+++ b/src/proto/xboardproto.cpp
@@ -27,7 +27,6 @@
#include <KDebug>
#include <KLocale>
#include <KFileDialog>
-#include <QTimer>
#include <settings.h>
using namespace Knights;
@@ -182,8 +181,7 @@ void XBoardProtocol::parseLine(const QString& line)
if ( m.isValid() )
{
kDebug() << "Move by" << attribute("program").toString() << ":" << \
m;
- pendingMove = m;
- QTimer::singleShot ( Settings::computerDelay(), this, \
SLOT(sendMove()) ); + emit pieceMoved ( m );
emit undoPossible ( true );
}
}
@@ -341,11 +339,6 @@ void XBoardProtocol::makeOffer(const Offer& offer)
}
}
-void XBoardProtocol::sendMove()
-{
- emit pieceMoved ( pendingMove );
-}
-
// kate: indent-mode cstyle; space-indent on; indent-width 4; replace-tabs on; \
replace-tabs on; replace-tabs on; replace-tabs on;
diff --git a/src/proto/xboardproto.h b/src/proto/xboardproto.h
index ea3b3a0..8e37a75 100644
--- a/src/proto/xboardproto.h
+++ b/src/proto/xboardproto.h
@@ -52,7 +52,6 @@ namespace Knights
int m_increment;
int m_baseTime;
bool m_timeLimit;
- Move pendingMove;
public Q_SLOTS:
virtual void init ();
@@ -66,7 +65,6 @@ namespace Knights
private Q_SLOTS:
void readError();
- void sendMove();
};
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic