winix/core/rebus.h

61 lines
660 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_core_rebus
#define headerfile_winix_core_rebus
#include <string>
#include <vector>
namespace Winix
{
struct Cur;
class Rebus
{
public:
struct Item
{
int key;
std::wstring question;
int answer;
};
void SetCur(Cur * pcur);
void Init();
Item * Rand();
bool IsAnswerOk(Item * item, const std::wstring & answer);
bool CheckRebus();
private:
Cur * cur;
bool InitPair(int a, int b, Item & item);
std::vector<Item> table;
};
} // namespace Winix
#endif