File:  [Local Repository] / DewFind / GameSquare.cpp
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed Mar 2 17:51:54 2011 UTC (13 years, 9 months ago) by nick
Branches: MAIN, INITIAL
CVS tags: r_0, HEAD
Initial import

#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;
	}
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>