summaryrefslogtreecommitdiffstats
path: root/kbattleship/kbattleship/kbrandomshotstrategy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbattleship/kbattleship/kbrandomshotstrategy.cpp')
-rw-r--r--kbattleship/kbattleship/kbrandomshotstrategy.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/kbattleship/kbattleship/kbrandomshotstrategy.cpp b/kbattleship/kbattleship/kbrandomshotstrategy.cpp
index a3748a69..62416350 100644
--- a/kbattleship/kbattleship/kbrandomshotstrategy.cpp
+++ b/kbattleship/kbattleship/kbrandomshotstrategy.cpp
@@ -27,7 +27,7 @@ KBRandomShotStrategy::~KBRandomShotStrategy()
delete m_destroyer;
}
-void KBRandomShotStrategy::init(KBattleField *field, const QRect &field_rect)
+void KBRandomShotStrategy::init(KBattleField *field, const TQRect &field_rect)
{
KBStrategy::init(field, field_rect);
KRandomSequence rand;
@@ -38,17 +38,17 @@ void KBRandomShotStrategy::init(KBattleField *field, const QRect &field_rect)
m_destroyer->init(field, field_rect);
}
-const QPoint KBRandomShotStrategy::nextShot()
+const TQPoint KBRandomShotStrategy::nextShot()
{
if(hasMoreShots())
{
if(m_destroying)
return m_destroyer->nextShot();
else if(advance())
- return QPoint(m_column, m_row);
+ return TQPoint(m_column, m_row);
}
- return QPoint(0, 0);
+ return TQPoint(0, 0);
}
bool KBRandomShotStrategy::advance()
@@ -67,7 +67,7 @@ bool KBRandomShotStrategy::hasMoreShots()
{
if((!m_destroying) && m_prevShots.count() > 0)
{
- QPoint pos = m_prevShots.last();
+ TQPoint pos = m_prevShots.last();
int state = m_battleField->ownState(pos.x(), pos.y());
if(state == KBattleField::HIT)
{
@@ -96,7 +96,7 @@ bool KBRandomShotStrategy::hasMoreShots()
return false;
}
-void KBRandomShotStrategy::shotAt(const QPoint &pos)
+void KBRandomShotStrategy::shotAt(const TQPoint &pos)
{
m_prevShots.append(pos);
}