• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kmahjongg

GameData Class Reference

#include <GameData.h>

List of all members.


Detailed Description

This class implements.

longer description

Author:
Mauricio Piacentini <mauricio@tabuleiro.com>

Definition at line 47 of file GameData.h.


Public Member Functions

 GameData (BoardLayout *boardlayout)
 ~GameData ()
void putTile (short e, short y, short x, UCHAR f)
void putTile (POSITION &pos)
bool tilePresent (int z, int y, int x)
bool partTile (int z, int y, int x)
UCHAR BoardData (short z, short y, short x)
void setBoardData (short z, short y, short x, UCHAR value)
UCHAR MaskData (short z, short y, short x)
UCHAR HighlightData (short z, short y, short x)
void setHighlightData (short z, short y, short x, UCHAR value)
POSITION & MoveListData (short i)
void setMoveListData (short i, POSITION &value)
char * getMaskBytes ()
bool saveToStream (QDataStream &out)
bool loadFromStream (QDataStream &in)
void generatePositionDepends ()
void generateTilePositions ()
bool generateStartPosition2 ()
bool findMove (POSITION &posA, POSITION &posB)
int moveCount ()
short findAllMatchingTiles (POSITION &posA)
void initialiseRemovedTiles ()
void setRemovedTilePair (POSITION &a, POSITION &b)
void clearRemovedTilePair (POSITION &a, POSITION &b)
bool isMatchingTile (POSITION &Pos1, POSITION &Pos2)
void shuffle ()
POSITION & getFromPosTable (int index)

Public Attributes

int allow_undo
int allow_redo
USHORT TileNum
USHORT MaxTileNum
short m_width
short m_height
short m_depth
short m_maxTiles
KRandomSequence random

Constructor & Destructor Documentation

GameData::GameData ( BoardLayout *  boardlayout  )  [explicit]

Constructor.

Parameters:
boardlayout 
See also:
BoardLayout

Definition at line 23 of file GameData.cpp.

GameData::~GameData (  ) 

Default Destructor.

Definition at line 42 of file GameData.cpp.


Member Function Documentation

void GameData::putTile ( short  e,
short  y,
short  x,
UCHAR  f 
)

Method Description.

Parameters:
e 
y 
x 
f 

Definition at line 46 of file GameData.cpp.

void GameData::putTile ( POSITION &  pos  )  [inline]

Method Description.

Parameters:
pos pos

Definition at line 77 of file GameData.h.

bool GameData::tilePresent ( int  z,
int  y,
int  x 
)

Method Description.

Parameters:
z 
y 
x 
Returns:
true if ...

false if ...

Definition at line 53 of file GameData.cpp.

bool GameData::partTile ( int  z,
int  y,
int  x 
)

Method Description.

Parameters:
z 
y 
x 
Returns:
true if ...

false if ...

Definition at line 58 of file GameData.cpp.

UCHAR GameData::BoardData ( short  z,
short  y,
short  x 
)

Method Description.

Parameters:
z 
y 
x 
Returns:
UCHAR

Definition at line 77 of file GameData.cpp.

void GameData::setBoardData ( short  z,
short  y,
short  x,
UCHAR  value 
)

Method Description.

Parameters:
z 
y 
x 
value 

Definition at line 82 of file GameData.cpp.

UCHAR GameData::MaskData ( short  z,
short  y,
short  x 
)

Method Description.

Parameters:
z 
y 
x 
Returns:
UCHAR

Definition at line 62 of file GameData.cpp.

UCHAR GameData::HighlightData ( short  z,
short  y,
short  x 
)

Method Description.

Parameters:
z 
y 
x 
Returns:
UCHAR

Definition at line 67 of file GameData.cpp.

void GameData::setHighlightData ( short  z,
short  y,
short  x,
UCHAR  value 
)

Method Description.

Parameters:
z 
y 
x 
value 

Definition at line 72 of file GameData.cpp.

POSITION & GameData::MoveListData ( short  i  ) 

Method Description.

Parameters:
i 
Returns:
POSITION pos

Definition at line 87 of file GameData.cpp.

void GameData::setMoveListData ( short  i,
POSITION &  value 
)

Method Description.

Parameters:
i 
value pos

Definition at line 95 of file GameData.cpp.

char* GameData::getMaskBytes (  )  [inline]

Method Description.

Returns:
*char blah blah

Definition at line 154 of file GameData.h.

bool GameData::saveToStream ( QDataStream &  out  ) 

Definition at line 977 of file GameData.cpp.

bool GameData::loadFromStream ( QDataStream &  in  ) 

Definition at line 952 of file GameData.cpp.

void GameData::generatePositionDepends (  ) 

Definition at line 128 of file GameData.cpp.

void GameData::generateTilePositions (  ) 

Definition at line 104 of file GameData.cpp.

bool GameData::generateStartPosition2 (  ) 

Definition at line 500 of file GameData.cpp.

bool GameData::findMove ( POSITION &  posA,
POSITION &  posB 
)

Definition at line 786 of file GameData.cpp.

int GameData::moveCount (  ) 

Definition at line 857 of file GameData.cpp.

short GameData::findAllMatchingTiles ( POSITION &  posA  ) 

Definition at line 915 of file GameData.cpp.

void GameData::initialiseRemovedTiles (  ) 

Definition at line 770 of file GameData.cpp.

void GameData::setRemovedTilePair ( POSITION &  a,
POSITION &  b 
)

Definition at line 695 of file GameData.cpp.

void GameData::clearRemovedTilePair ( POSITION &  a,
POSITION &  b 
)

Definition at line 732 of file GameData.cpp.

bool GameData::isMatchingTile ( POSITION &  Pos1,
POSITION &  Pos2 
)

Definition at line 678 of file GameData.cpp.

void GameData::shuffle (  ) 

Definition at line 1000 of file GameData.cpp.

POSITION& GameData::getFromPosTable ( int  index  )  [inline]

Definition at line 180 of file GameData.h.


Member Data Documentation

int GameData::allow_undo

Member Description.

Definition at line 60 of file GameData.h.

int GameData::allow_redo

Member Description.

Definition at line 61 of file GameData.h.

USHORT GameData::TileNum

Member Description.

Definition at line 63 of file GameData.h.

USHORT GameData::MaxTileNum

Member Description.

Definition at line 64 of file GameData.h.

short GameData::m_width

Board width.

Definition at line 160 of file GameData.h.

short GameData::m_height

Board height.

Definition at line 161 of file GameData.h.

short GameData::m_depth

Board depth.

Definition at line 162 of file GameData.h.

short GameData::m_maxTiles

maxTiles on Board

Definition at line 163 of file GameData.h.

KRandomSequence GameData::random

Definition at line 169 of file GameData.h.


The documentation for this class was generated from the following files:
  • GameData.h
  • GameData.cpp

kmahjongg

Skip menu "kmahjongg"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal