1 /**************************************************************************** 2 * Copyright 2011 Ian Wadham <iandw.au@gmail.com> * 3 * * 4 * This program is free software; you can redistribute it and/or * 5 * modify it under the terms of the GNU General Public License as * 6 * published by the Free Software Foundation; either version 2 of * 7 * the License, or (at your option) any later version. * 8 * * 9 * This program is distributed in the hope that it will be useful, * 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 * GNU General Public License for more details. * 13 * * 14 * You should have received a copy of the GNU General Public License * 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 16 ****************************************************************************/ 17 18 #ifndef STATE_H 19 #define STATE_H 20 21 #include <QObject> 22 23 #include "globals.h" 24 #include "sudokuboard.h" 25 26 class State : public QObject 27 { 28 Q_OBJECT 29 public: 30 State (QObject * parent, 31 const GuessesList & guesses, 32 const int guessNumber, 33 const BoardContents & values, 34 const MoveList & moves, 35 const MoveList & moveTypes); 36 guesses()37 GuessesList guesses() { return m_guesses; } guessNumber()38 int guessNumber() { return m_guessNumber; } values()39 BoardContents values() { return m_values; } setGuessNumber(int n)40 void setGuessNumber (int n) { m_guessNumber = n; } moves()41 MoveList moves() { return m_moves; } moveTypes()42 MoveList moveTypes() { return m_moveTypes; } 43 44 private: 45 GuessesList m_guesses; 46 int m_guessNumber; 47 BoardContents m_values; 48 MoveList m_moves; 49 MoveList m_moveTypes; 50 }; 51 52 #endif // STATE_H 53