~ubuntu-branches/ubuntu/lucid/gbrainy/lucid

« back to all changes in this revision

Viewing changes to src/Core/Main/GameTips.cs

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-01-12 11:21:24 UTC
  • mfrom: (13.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100112112124-o4ztomxa0xfh2ulj
Tags: 1.30-1ubuntu1
* debian/control:
  - Revert build-depends to lucid versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2007-2008 Jordi Mas i Hernàndez <jmas@softcatala.org>
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 */
 
19
 
 
20
 
 
21
using System;
 
22
using Mono.Unix;
 
23
 
 
24
namespace gbrainy.Core.Main
 
25
{
 
26
        static public class GameTips
 
27
        {
 
28
                static ArrayListIndicesRandom random_indices;
 
29
                static int idx = 0;
 
30
        
 
31
                static public int Count {
 
32
                        get { return 13; }
 
33
                }
 
34
 
 
35
                // Gets a random tip from the list
 
36
                static public string Tip {
 
37
                        get {
 
38
                                if (idx + 1 >= Count || random_indices == null) {
 
39
                                        random_indices = new ArrayListIndicesRandom (Count);
 
40
                                        random_indices.Initialize ();
 
41
                                        idx = 0;
 
42
                                }
 
43
                                return GetTip (random_indices [idx++]);
 
44
                        }
 
45
                }
 
46
 
 
47
                static public string GetTip (int tip)
 
48
                {
 
49
                        switch (tip) {
 
50
                        case 0:
 
51
                                return Catalog.GetString ("Read the instructions carefully and identify the data and given clues.");
 
52
                        case 1:
 
53
                                return Catalog.GetString ("To score the player gbrainy uses the time and tips needed to complete each game.");
 
54
                        case 2:
 
55
                                return Catalog.GetString ("In logic games, elements that may seem irrelevant can be very important.");
 
56
                        case 3:
 
57
                                return Catalog.GetString ("Break the mental blocks and look into the boundaries of problems.");
 
58
                        case 4:
 
59
                                return Catalog.GetString ("Enjoy making mistakes, they are part of the learning process.");
 
60
                        case 5:
 
61
                                return Catalog.GetString ("Do all the problems, even the difficult ones. Improvement comes from practising.");
 
62
                        case 6:
 
63
                                return Catalog.GetString ("Play on a daily basis, you will notice progress soon.");
 
64
                        case 7: // Translators: Custom Game Selection is a menu option
 
65
                                return Catalog.GetString ("Use the 'Custom Game Selection' to choose exactly which games you want to play.");
 
66
                        case 8:
 
67
                                return Catalog.GetString ("Use the Settings to adjust the difficulty level of the game.");
 
68
                        case 9:
 
69
                                return Catalog.GetString ("Association of elements is a common technique for remembering things.");
 
70
                        case 10:
 
71
                                return Catalog.GetString ("Grouping elements into categories is a common technique for remembering things.");
 
72
                        case 11:
 
73
                                return Catalog.GetString ("Build acronyms using the first letter of each fact to be remembered.");
 
74
                        case 12:
 
75
                                return Catalog.GetString ("The enjoyment obtained from a puzzle is proportional to the time spent on it.");
 
76
                        default:
 
77
                                throw new InvalidOperationException ();
 
78
                        }
 
79
                }
 
80
        }
 
81
}