Go to the documentation of this file.00001
00006 #ifndef _KAKURO_H_
00007 #define _KAKURO_H_
00008
00009 #include <vector>
00010 #include <iostream>
00011
00012
00021 class Kakuro
00022 {
00023 private:
00027 unsigned int mSize;
00028
00032 unsigned int nSize;
00033
00040 std::vector< std::vector<unsigned int> > gridStruct;
00041
00046 std::vector< std::vector<unsigned int> > horizontalSum;
00047
00052 std::vector< std::vector<unsigned int> > verticalSum;
00053
00060 std::vector<unsigned int> sumsValue;
00061
00068 std::vector< std::vector<unsigned int> > sumsAbscissa;
00069
00076 std::vector< std::vector<unsigned int> > sumsOrdinate;
00077
00078
00079 public:
00080
00094 static void parseCell(std::string cell,
00095 bool * type,
00096 unsigned int * horizontal,
00097 unsigned int * vertical );
00098
00099
00104 void printGrids();
00105
00106
00115 void parseGrid(std::istream * input);
00116
00126 void printToStream(std::ostream&,bool);
00127
00134 void grids2sums();
00135
00146 void assignValue(unsigned int, unsigned int, unsigned int);
00147
00152 unsigned int getNSize();
00153
00158 unsigned int getMSize();
00159
00164 unsigned int getNHints();
00165
00170 std::vector< std::vector<unsigned int> > getGridStruc();
00171
00176 std::vector< std::vector<unsigned int> > getHorizontalSum();
00177
00182 std::vector< std::vector<unsigned int> > getVerticalSum();
00183
00188 std::vector<unsigned int> getSumsValue();
00189
00194 std::vector< std::vector<unsigned int> > getSumsOrdinate();
00195
00200 std::vector< std::vector<unsigned int> > getSumsAbscissa();
00201
00202 };
00203
00204 #endif