User Tools

Site Tools


notes:data:piece

Game Piece Function

FILES:

  • piece/Makefile
  • include/piece.h
  • piece/accessor.cc
  • piece/create.cc
  • piece/destroy.cc

int getColor()

Function Parameter(s) Return value
getColor() none int
Returns the game pieces color ID (0 for black, 1 for white)

int getLocation()

Function Parameter(s) Return value
getLocation() none int
Function returns a pieces location on the board in integer format.

int getPieceId()

Function Parameter(s) Return value
getPieceId() none int
Function returns a pieces unique identifier in integer format.

bool setColor(int color)

Function Parameter(s) Return value
setColor(int color) int bool
Function set's game piece color identifier via supplied int argument.  
Returns boolean success.

bool setLocation(int loc)

Function Parameter(s) Return value
setLocation(int loc) int bool
Function set's game piece's game board location via supplied int argument.  
Returns boolean success.

bool setPieceId(int id)

Function Parameter(s) Return value
setPieceId(int id) int bool
Function set's game piece's unique identifier via supplied int argument.  
Returns boolean success.
notes/data/piece.txt · Last modified: 2010/12/19 05:51 by afassett