/*
* =====================================================================================
*
* Filename: AbstractChessBoard.h
*
* Description: Representation of a chess board and pieces (no GUI)
*
* Version: 1.0
* Created: 21/02/2011 07:38:31
* Revision: none
* Compiler: gcc
*
* Author: John Ryland (jryland), jryland@xiaofrog.com
* Company: InvertedLogic
*
* =====================================================================================
*/
#ifndef __ABSTRACT_CHESS_BOARD_H__
#define __ABSTRACT_CHESS_BOARD_H__
#include <QList>
#include <AbstractChessPiece.h>
struct ChessBoardPieceDescription
{
ChessPieceType type : 4;
ChessPieceColor side : 1;
unsigned int rank : 3;
unsigned int file : 3;
};
class AbstractChessBoard
{
public:
AbstractChessBoard();
~AbstractChessBoard();
//void remove(int row, int col);
ChessBoardPieceDescription at(unsigned int row, unsigned int col);
AbstractChessPiece *pieceAt(unsigned int row, unsigned int col);
QList<AbstractChessPiece*> pieces;
//private:
//ChessBoardPieceDescription board[8][8];
};
#endif // __ABSTRACT_CHESS_BOARD_H__