text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

Board.h

Go to the documentation of this file.
00001 
00018 #ifndef BOARD_H
00019 #define BOARD_H
00020 
00021 #include "Queen.h"
00022 #include <vector>
00023 #include <iostream>
00024 
00025 using namespace std;
00026 
00027 static const int BOARD_SIZE = 8;
00028 
00030 class Board
00031 {
00032 public:
00034    Board();
00036    ~Board();
00037 
00039    void clear();
00041    void display() const;
00042 
00044    void doEightQueens();
00045 
00047    int getNumQueens() const;
00048 
00050    const Queen *getQueen(int index) const;
00051 
00052 private:
00053 
00056    bool isQueen(int inRow, int inCol) const;
00057 
00060    bool placeQueens(Queen *queenPtr);
00061 
00064    void removeQueen();
00065 
00067    void setQueen(const Queen *queenPtr);
00068 
00070    vector<const Queen *> queens;
00071 }; // end Board
00072 
00073 #endif
00074 

Generated on Sun Aug 27 13:27:58 2006 for AWLogo by  doxygen 1.4.6