2
* Copyright (C) 2008 Jordi Mas i Hernàndez <jmas@softcatala.org>
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation; either version 2 of the
7
* License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* General Public License for more details.
14
* You should have received a copy of the GNU General Public
15
* License along with this program; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
24
public class PuzzleCountSeries : Game
34
private string question;
36
public override string Name {
37
get {return Catalog.GetString ("Count series");}
40
public override string Question {
41
get {return question;}
44
public override string Answer {
46
string answer = base.Answer + " ";
51
public override void Initialize ()
53
switch ((GameType) random.Next ((int) GameType.Length))
55
case GameType.HowManyNines:
56
question = Catalog.GetString ("How many numbers \"9\" are required to represent the numbers between 10 to 100?");
60
case GameType.HowManyBiggerDigits:
61
question = Catalog.GetString ("How many two digit numbers occur where the first digit is larger than the second (e.g.: 20 and 21)?");
65
case GameType.HowManySmallerDigits:
66
question = Catalog.GetString ("How many two digit numbers occur where the first digit is smaller than the second (e.g.: 12 and 13)?");
72
public override void Draw (CairoContextEx gr, int area_width, int area_height)
74
base.Draw (gr, area_width, area_height);