The DejaVU Framework -- hush 3.1

include: professional-program-11-GameBoard-GameBoard.h /cygdrive/d/www/media


- [up] [top] - index make include source logic grammar scripts html configure mx slides talks scenes reports projects
<body bgcolor="#FFFFFF" text="#000000">

// GameBoard.h

<h4 align=right text=red> GamePiece</h4><hr>
  class GamePiece {};
<hr>


<hr>

GameBoard</h4>
  class GameBoard
  {
   public:
    // The general-purpose GameBoard allows the user to specify its dimensions
    GameBoard(int inWidth = kDefaultWidth, int inHeight = kDefaultHeight);
    GameBoard(const GameBoard& src); // copy constructor
    ~GameBoard();
    GameBoard& operator=(const GameBoard& rhs); // assignment operator
  
    void setPieceAt(int x, int y, const GamePiece& inPiece);
    GamePiece& getPieceAt(int x, int y);
    const GamePiece& getPieceAt(int x, int y) const;
  
    int getHeight() const { return mHeight; }
    int getWidth() const { return mWidth; }
    static const int kDefaultWidth = 10;
    static const int kDefaultHeight = 10;
  
   protected:
    void copyFrom(const GameBoard& src);
    // objects dynamically allocate space for the game pieces.
    GamePiece** mCells;
    int mWidth, mHeight;
  };


  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author. <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-2780434-1"; urchinTracker(); </script>

Hush Online Technology
hush@cs.vu.nl
10/19/08