#include "StdAfx.h" #include "resource.h" #include "Dewconst.h" #include "GameSquare.h" GameSquare::GameSquare() { Clear(); } GameSquare::~GameSquare() { } void GameSquare::Clear() { Letter_ = '1'; Selected_ = false; Found_ = false; wordnumber_ = -1; } char GameSquare::GetLetter() { return(Letter_); } int GameSquare::GetNumber() { return(wordnumber_); } bool GameSquare::IsSelected() { return(Selected_); } bool GameSquare::IsFound() { return(Found_); } void GameSquare::SetSelect(bool ans) { Selected_ = ans; } void GameSquare::SetFound() { Found_ = true; Selected_ = false; } void GameSquare::SetData(char letter,int wordnumber) { SetLetter(letter); SetNumber(wordnumber); } //--------------------------PRIVATE FUNCTIONS------------------------------------------------------------ void GameSquare::SetLetter(char letter) { Letter_ = letter; } void GameSquare::SetNumber(int wordnumber) { if (wordnumber < MAXWORDS) { wordnumber_ = wordnumber; } else { wordnumber_ = -1; } }