-
Notifications
You must be signed in to change notification settings - Fork 0
/
gameparameters.h
114 lines (92 loc) · 2.77 KB
/
gameparameters.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
* Quackle -- Crossword game artificial intelligence and analysis tool
* Copyright (C) 2005-2006 Jason Katz-Brown and John O'Laughlin.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef QUACKLE_GAMEPARAMETERS_H
#define QUACKLE_GAMEPARAMETERS_H
namespace Quackle
{
class GameParameters
{
public:
GameParameters();
int minimumTilesForExchange() const;
void setMinimumTilesForExchange(int minimumTilesForExchange);
// negative number -> no limit
int numberOfScorelessTurnsThatEndsGame() const;
void setNumberOfScorelessTurnsThatEndsGame(int numberOfScorelessTurnsThatEndsGame);
int bingoBonus() const;
void setBingoBonus(int bingoBonus);
int rackSize() const;
void setRackSize(int rackSize);
unsigned int overdrawPenalty() const;
void setOverdrawPenalty(unsigned int overdrawPenalty);
protected:
int m_minimumTilesForExchange;
int m_numberOfScorelessTurnsThatEndsGame;
int m_bingoBonus;
int m_rackSize;
unsigned int m_overdrawPenalty;
};
inline int GameParameters::minimumTilesForExchange() const
{
return m_minimumTilesForExchange;
}
inline int GameParameters::numberOfScorelessTurnsThatEndsGame() const
{
return m_numberOfScorelessTurnsThatEndsGame;
}
inline void GameParameters::setNumberOfScorelessTurnsThatEndsGame(int numberOfScorelessTurnsThatEndsGame)
{
m_numberOfScorelessTurnsThatEndsGame = numberOfScorelessTurnsThatEndsGame;
}
inline int GameParameters::bingoBonus() const
{
return m_bingoBonus;
}
inline int GameParameters::rackSize() const
{
return m_rackSize;
}
inline unsigned int GameParameters::overdrawPenalty() const
{
return m_overdrawPenalty;
}
inline void GameParameters::setMinimumTilesForExchange(int minimumTilesForExchange)
{
m_minimumTilesForExchange = minimumTilesForExchange;
}
inline void GameParameters::setBingoBonus(int bingoBonus)
{
m_bingoBonus = bingoBonus;
}
inline void GameParameters::setRackSize(int rackSize)
{
m_rackSize = rackSize;
}
inline void GameParameters::setOverdrawPenalty(unsigned int overdrawPenalty)
{
m_overdrawPenalty = overdrawPenalty;
}
class EnglishParameters : public GameParameters
{
public:
EnglishParameters();
};
}
#endif