ScummVM API documentation
bgenut.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General public: License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General public: License for more details.
16 *
17 * You should have received a copy of the GNU General public: License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef HODJNPODJ_MANKALA_BGENUT_H
23#define HODJNPODJ_MANKALA_BGENUT_H
24
25#include "bagel/afxwin.h"
26#include "bagel/hodjnpodj/mankala/bgen.h"
27
28namespace Bagel {
29namespace HodjNPodj {
30namespace Mankala {
31
32// class CGenUtil -- general utilities
33class CGenUtil {
34 bool m_bRandomInit = 0; // random number seed initialized
35
36public:
37 CGenUtil() {}
38
39// bgenut.cpp -- Boffo Games general utilities
40
41//- RandomInteger -- find random integer in specified range
42public:
43 int RandomInteger(int iLow, int iHigh) ;
44//- RandomEvent -- return true with specified probability
45public:
46 bool RandomEvent(int iNum, int iDenom) ;
47//- RandomPermutation -- generate a random permutation
48// Generates a permutation of size iSize of the
49// integers from 0 to (iNum-1)
50public:
51 void RandomPermutation(int iNum,
52 int iSize, int *xpIntOut) ;
53//- NormalizeCRect --
54public:
55 bool PASCAL NormalizeCRect(CRect& cRect) ;
56//- RandomSelection -- random selection of integer array
57public:
58 void RandomSelection(int *xpiArray, int iNum,
59 int iSize) ;
60
61
62} ;
63
64} // namespace Mankala
65} // namespace HodjNPodj
66} // namespace Bagel
67
68#endif
Definition: atltypes.h:131