Annotation of DewFind/GameSquare.cpp, revision 1.1
1.1 ! nick 1: #include "StdAfx.h"
! 2: #include "resource.h"
! 3: #include "Dewconst.h"
! 4: #include "GameSquare.h"
! 5:
! 6: GameSquare::GameSquare()
! 7: {
! 8: Clear();
! 9: }
! 10:
! 11: GameSquare::~GameSquare()
! 12: {
! 13: }
! 14:
! 15: void GameSquare::Clear()
! 16: {
! 17: Letter_ = '1';
! 18: Selected_ = false;
! 19: Found_ = false;
! 20: wordnumber_ = -1;
! 21: }
! 22:
! 23:
! 24: char GameSquare::GetLetter()
! 25: {
! 26: return(Letter_);
! 27: }
! 28:
! 29: int GameSquare::GetNumber()
! 30: {
! 31: return(wordnumber_);
! 32: }
! 33:
! 34: bool GameSquare::IsSelected()
! 35: {
! 36: return(Selected_);
! 37: }
! 38:
! 39: bool GameSquare::IsFound()
! 40: {
! 41: return(Found_);
! 42: }
! 43:
! 44: void GameSquare::SetSelect(bool ans)
! 45: {
! 46: Selected_ = ans;
! 47: }
! 48:
! 49: void GameSquare::SetFound()
! 50: {
! 51: Found_ = true;
! 52: Selected_ = false;
! 53: }
! 54:
! 55: void GameSquare::SetData(char letter,int wordnumber)
! 56: {
! 57: SetLetter(letter);
! 58: SetNumber(wordnumber);
! 59: }
! 60:
! 61: //--------------------------PRIVATE FUNCTIONS------------------------------------------------------------
! 62: void GameSquare::SetLetter(char letter)
! 63: {
! 64: Letter_ = letter;
! 65: }
! 66:
! 67: void GameSquare::SetNumber(int wordnumber)
! 68: {
! 69: if (wordnumber < MAXWORDS)
! 70: {
! 71: wordnumber_ = wordnumber;
! 72: }
! 73: else
! 74: {
! 75: wordnumber_ = -1;
! 76: }
! 77: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>