Planeshift
Public Member Functions

pawsGameBoard Class Reference

The game window class. More...

#include <pawsgameboard.h>

List of all members.

Public Member Functions

size_t BlackPiecesCount () const
 Number of available black pieces.
uint8_t BlackPiecesList (size_t idx) const
 List of available black pieces.
void CleanBoard ()
 Cleans the game board.
void DropPiece (pawsGameTile *tile=0)
 Drops the game piece either to a new game tile or to void.
int8_t GetCols () const
 Returns the number of columns.
uint32_t GetGameID () const
 Returns the game ID value.
uint16_t GetGameOptions () const
 Returns game options.
int8_t GetRows () const
 Returns the number of rows.
virtual void HandleMessage (MsgEntry *message)
 Net messages handler.
virtual void Hide ()
 Sends the stop game message to the server.
bool IsDragging () const
 Returns true if a game piece is being dragged.
uint8_t NextPiece (uint8_t current) const
 Next available game piece.
 pawsGameBoard ()
const csString PieceArtName (uint8_t piece) const
 Returns the name of the art resource.
virtual bool PostSetup ()
 Subscribes to net messages.
void SetGameOptions (uint16_t newOptions)
 Sets game options.
void SetupBoard (psMGBoardMessage &msg)
 Creates the game board.
void StartDragging (pawsGameTile *tile)
 Starts dragging a game piece.
void StartGame ()
 Starts a new game session.
void UpdateBoard (psMGBoardMessage &msg)
 Updates the game board.
void UpdatePiece (pawsGameTile *tile)
 Updates the game when a game piece is changed.
size_t WhitePiecesCount () const
 Number of available white pieces.
uint8_t WhitePiecesList (size_t idx) const
 List of available white pieces.
 ~pawsGameBoard ()

Detailed Description

The game window class.

Minigame PAWS class handles the gameboard on the client: moves from players and updates from the server.

Definition at line 102 of file pawsgameboard.h.


Constructor & Destructor Documentation

pawsGameBoard::pawsGameBoard ( )
pawsGameBoard::~pawsGameBoard ( )

Member Function Documentation

size_t pawsGameBoard::BlackPiecesCount ( ) const [inline]

Number of available black pieces.

Definition at line 186 of file pawsgameboard.h.

uint8_t pawsGameBoard::BlackPiecesList ( size_t  idx) const [inline]

List of available black pieces.

Definition at line 168 of file pawsgameboard.h.

void pawsGameBoard::CleanBoard ( )

Cleans the game board.

void pawsGameBoard::DropPiece ( pawsGameTile tile = 0)

Drops the game piece either to a new game tile or to void.

int8_t pawsGameBoard::GetCols ( ) const [inline]

Returns the number of columns.

Definition at line 141 of file pawsgameboard.h.

uint32_t pawsGameBoard::GetGameID ( ) const [inline]

Returns the game ID value.

Definition at line 132 of file pawsgameboard.h.

uint16_t pawsGameBoard::GetGameOptions ( ) const [inline]

Returns game options.

Definition at line 135 of file pawsgameboard.h.

int8_t pawsGameBoard::GetRows ( ) const [inline]

Returns the number of rows.

Definition at line 144 of file pawsgameboard.h.

virtual void pawsGameBoard::HandleMessage ( MsgEntry message) [virtual]

Net messages handler.

Implements psClientNetSubscriber.

virtual void pawsGameBoard::Hide ( ) [virtual]

Sends the stop game message to the server.

Reimplemented from pawsWidget.

bool pawsGameBoard::IsDragging ( ) const [inline]

Returns true if a game piece is being dragged.

Definition at line 147 of file pawsgameboard.h.

uint8_t pawsGameBoard::NextPiece ( uint8_t  current) const

Next available game piece.

const csString pawsGameBoard::PieceArtName ( uint8_t  piece) const

Returns the name of the art resource.

virtual bool pawsGameBoard::PostSetup ( ) [virtual]

Subscribes to net messages.

Reimplemented from pawsWidget.

void pawsGameBoard::SetGameOptions ( uint16_t  newOptions)

Sets game options.

void pawsGameBoard::SetupBoard ( psMGBoardMessage msg)

Creates the game board.

void pawsGameBoard::StartDragging ( pawsGameTile tile)

Starts dragging a game piece.

void pawsGameBoard::StartGame ( )

Starts a new game session.

void pawsGameBoard::UpdateBoard ( psMGBoardMessage msg)

Updates the game board.

void pawsGameBoard::UpdatePiece ( pawsGameTile tile)

Updates the game when a game piece is changed.

size_t pawsGameBoard::WhitePiecesCount ( ) const [inline]

Number of available white pieces.

Definition at line 177 of file pawsgameboard.h.

uint8_t pawsGameBoard::WhitePiecesList ( size_t  idx) const [inline]

List of available white pieces.

Definition at line 159 of file pawsgameboard.h.


The documentation for this class was generated from the following file: