NorthMove Class Reference

#include <NorthMove.h>

Inheritance diagram for NorthMove:

Inheritance graph
[legend]
Collaboration diagram for NorthMove:

Collaboration graph
[legend]

Public Member Functions

virtual move_command getHandledMovement () const
 Return the handled movement.
virtual std::pair< int, int > getHandledRelCoords () const
 Transform a move_command into a pair of relative coordinates.
virtual move_command getHandledOpposite () const
 Give the opposite movement.
 NorthMove (Move *next)
 Constructor.

Detailed Description

< Movement to the north

Definition at line 33 of file NorthMove.h.


Constructor & Destructor Documentation

NorthMove::NorthMove ( Move next  )  [inline]

Constructor.

Parameters:
next the next handled move

Definition at line 62 of file NorthMove.h.

00062 : Move(next) {}


Member Function Documentation

move_command NorthMove::getHandledMovement (  )  const [virtual]

Return the handled movement.

Returns:
handled movement

Implements Move.

Definition at line 27 of file NorthMove.cpp.

References MOVECMD_NORTH.

00027                                                  {
00028   return MOVECMD_NORTH;
00029 }

std::pair< int, int > NorthMove::getHandledRelCoords (  )  const [virtual]

Transform a move_command into a pair of relative coordinates.

Returns:
the pair of the future coordinate (after the move)

Implements Move.

Definition at line 31 of file NorthMove.cpp.

00031                                                       {
00032   std::pair<int,int> p(-1, 0);
00033   return p;
00034 }

move_command NorthMove::getHandledOpposite (  )  const [virtual]

Give the opposite movement.

Returns:
the opposite movement

Implements Move.

Definition at line 36 of file NorthMove.cpp.

References MOVECMD_SOUTH.

00036                                                  {
00037   return MOVECMD_SOUTH;
00038 }


The documentation for this class was generated from the following files:
Generated on Sat Feb 2 22:23:17 2008 for Teapot Colony Wars by  doxygen 1.5.4