Files
winix/core/rebus.h
Tomasz Sowa 2ca44ec361 added: Rebus
(when no logged user wants to send a message then he is asked a question)


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@521 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-16 23:36:38 +00:00

44 lines
572 B
C++
Executable File

/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2008-2009, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecmslucorerebus
#define headerfilecmslucorerebus
#include <string>
#include <vector>
class Rebus
{
public:
struct Item
{
int key;
std::string question;
int answer;
};
void Init();
Item * Rand();
bool IsAnswerOk(Item * item, const std::string & answer);
private:
bool InitPair(int a, int b, Item & item);
std::vector<Item> table;
};
#endif