Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

AtomicMove Class Reference

This class represents an atomic move of the keeper or a gem. More...

#include <atomic_move.h>

List of all members.

Public Types

enum  AtomicMoveType { LEFT, RIGHT, UP, DOWN }

Public Methods

 AtomicMove (AtomicMoveType type)
AtomicMoveType type () const
QPoint const & diff () const
QString toText () const

Private Attributes

AtomicMoveType m_type

Static Private Attributes

QPoint const s_diffs [4]


Detailed Description

This class represents an atomic move of the keeper or a gem.

An atomic move is a move one field left, right, up or down.

Author:
Ralf Schmelter (ralfs@pc2a.chemie.uni-dortmund.de).
Version:
0.1
See also:
Move


Member Enumeration Documentation

enum AtomicMove::AtomicMoveType
 

Defines codes for atomic moves.

Enumeration values:
LEFT   An atomic move left.
RIGHT   An atomic move right.
UP   An atomic move up.
DOWN   An atomic move down.


Constructor & Destructor Documentation

AtomicMove::AtomicMove AtomicMoveType type
 

Constructs the atomic move from an AtomicMoveType.

Parameters:
type   The type of the move.


Member Function Documentation

QPoint const& AtomicMove::diff const
 

Returns a point which represents the atomic move.

For AtomicMove::LEFT we return QPoint(-1, 0). For AtomicMove::RIGHT we return QPoint(1, 0). For AtomicMove::UP we return QPoint(0, -1). For AtomicMove::DOWN we return QPoint(0, 1).

QString AtomicMove::toText const
 

Returns a human readable representation of the atomic move.

AtomicMoveType AtomicMove::type const
 

Returns the AtomicMoveType.


Member Data Documentation

AtomicMoveType AtomicMove::m_type [private]
 

The atomic move type.

QPoint const AtomicMove::s_diffs[4] [static, private]
 

The diffs for the four directions.


The documentation for this class was generated from the following file:
Generated at Sun Jan 6 18:49:10 2002 for EasySok by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001