52 lines
630 B
C++
Executable File
52 lines
630 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 headerfilecmslucorerebus
|
|
#define headerfilecmslucorerebus
|
|
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
|
|
class Request;
|
|
|
|
|
|
class Rebus
|
|
{
|
|
public:
|
|
|
|
struct Item
|
|
{
|
|
int key;
|
|
std::string question;
|
|
int answer;
|
|
};
|
|
|
|
|
|
|
|
void SetRequest(Request * prequest);
|
|
void Init();
|
|
Item * Rand();
|
|
bool IsAnswerOk(Item * item, const std::string & answer);
|
|
bool CheckRebus();
|
|
|
|
private:
|
|
|
|
Request * request;
|
|
|
|
bool InitPair(int a, int b, Item & item);
|
|
|
|
std::vector<Item> table;
|
|
|
|
|
|
};
|
|
|
|
#endif
|