diff options
Diffstat (limited to 'kbattleship/kbattleship/kbverticalstepstrategy.cpp')
-rw-r--r-- | kbattleship/kbattleship/kbverticalstepstrategy.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kbattleship/kbattleship/kbverticalstepstrategy.cpp b/kbattleship/kbattleship/kbverticalstepstrategy.cpp index 736e9ac8..7642ccaf 100644 --- a/kbattleship/kbattleship/kbverticalstepstrategy.cpp +++ b/kbattleship/kbattleship/kbverticalstepstrategy.cpp @@ -40,27 +40,27 @@ KBVerticalStepStrategy::~KBVerticalStepStrategy() delete m_destroyer; } -void KBVerticalStepStrategy::init(KBattleField *field, const QRect &field_rect) +void KBVerticalStepStrategy::init(KBattleField *field, const TQRect &field_rect) { KBStrategy::init(field, field_rect); KRandomSequence rand; m_column = (int) rand.getLong(m_fieldRect.width()); m_row = (int) rand.getLong(m_fieldRect.height()); - m_start = QPoint(m_column, m_row); + m_start = TQPoint(m_column, m_row); m_passes = 0; if(m_destroyer != 0) m_destroyer->init(field, field_rect); } -const QPoint KBVerticalStepStrategy::nextShot() +const TQPoint KBVerticalStepStrategy::nextShot() { if(hasMoreShots()) { if(m_destroying) return m_destroyer->nextShot(); else if(m_passes == 0) - return QPoint(m_column, m_row); + return TQPoint(m_column, m_row); else if(m_parent == 0) return m_child->nextShot(); } @@ -103,7 +103,7 @@ bool KBVerticalStepStrategy::advance() void KBVerticalStepStrategy::setStart(int col, int row) { - m_start = QPoint(col, row); + m_start = TQPoint(col, row); m_column = col; m_row = row; } @@ -133,7 +133,7 @@ bool KBVerticalStepStrategy::hasMoreShots() // Parent Strategy 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) { @@ -206,7 +206,7 @@ bool KBVerticalStepStrategy::hasMoreShots() } } -void KBVerticalStepStrategy::shotAt(const QPoint &pos) +void KBVerticalStepStrategy::shotAt(const TQPoint &pos) { m_prevShots.append(pos); if(m_child != 0) |