diff options
Diffstat (limited to 'kbattleship/kbattleship/kbhorizontalstepstrategy.cpp')
-rw-r--r-- | kbattleship/kbattleship/kbhorizontalstepstrategy.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp b/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp index 080bc08e..a6e931da 100644 --- a/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp +++ b/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp @@ -38,27 +38,27 @@ KBHorizontalStepStrategy::~KBHorizontalStepStrategy() delete m_destroyer; } -void KBHorizontalStepStrategy::init(KBattleField *field, const QRect &field_rect) +void KBHorizontalStepStrategy::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 KBHorizontalStepStrategy::nextShot() +const TQPoint KBHorizontalStepStrategy::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(); } @@ -101,7 +101,7 @@ bool KBHorizontalStepStrategy::advance() void KBHorizontalStepStrategy::setStart(int col, int row) { - m_start = QPoint(col, row); + m_start = TQPoint(col, row); m_column = col; m_row = row; } @@ -131,7 +131,7 @@ bool KBHorizontalStepStrategy::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) { @@ -202,7 +202,7 @@ bool KBHorizontalStepStrategy::hasMoreShots() } } -void KBHorizontalStepStrategy::shotAt(const QPoint &pos) +void KBHorizontalStepStrategy::shotAt(const TQPoint &pos) { m_prevShots.append(pos); if(m_child != 0) |