52 lines
615 B
C++
Executable File
52 lines
615 B
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008-2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfile_winix_core_rebus
|
|
#define headerfile_winix_core_rebus
|
|
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
|
|
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;
|
|
|
|
|
|
};
|
|
|
|
#endif
|