gbrainy r331 - trunk/src



Author: jmas
Date: Sat May 10 13:18:06 2008
New Revision: 331
URL: http://svn.gnome.org/viewvc/gbrainy?rev=331&view=rev

Log:
A few small fixes

Modified:
   trunk/src/CalculationOperator.cs
   trunk/src/CalculationTwoNumbers.cs
   trunk/src/ChangeLog
   trunk/src/CustomGameDialog.cs
   trunk/src/GameManager.cs

Modified: trunk/src/CalculationOperator.cs
==============================================================================
--- trunk/src/CalculationOperator.cs	(original)
+++ trunk/src/CalculationOperator.cs	Sat May 10 13:18:06 2008
@@ -42,7 +42,7 @@
 	}
 
 	public override string Question {
-		get {return String.Format (Catalog.GetString ("Which operators make {0}, {1}, and {2} equal {3}?"), number_a, number_b, number_c, total);} 
+		get {return String.Format (Catalog.GetString ("Which operators make {0}, {1}, and {2} equal {3} (answer using +-/*)?"), number_a, number_b, number_c, total);} 
 	}
 
 	private double ProcessOperation (double total, double number, char op)

Modified: trunk/src/CalculationTwoNumbers.cs
==============================================================================
--- trunk/src/CalculationTwoNumbers.cs	(original)
+++ trunk/src/CalculationTwoNumbers.cs	Sat May 10 13:18:06 2008
@@ -46,10 +46,10 @@
 			max_operand = 8;
 			break;
 		case Difficulty.Medium:
-			max_operand = 12;
+			max_operand = 10;
 			break;
 		case Difficulty.Master:
-			max_operand = 25;
+			max_operand = 15;
 			break;
 		}
 

Modified: trunk/src/CustomGameDialog.cs
==============================================================================
--- trunk/src/CustomGameDialog.cs	(original)
+++ trunk/src/CustomGameDialog.cs	Sat May 10 13:18:06 2008
@@ -44,7 +44,7 @@
 		this.manager = manager;
 		gm = new GameManager ();
 		gm.GameType = GameSession.Types.AllGames;
-		games = gm.Games;
+		games = gm.CustomGames;
 		dialog = null;
 
 		drawing_area = new CairoPreview ();
@@ -182,7 +182,7 @@
 		});
 
 		
-		manager.Games = custom_games;
+		manager.CustomGames = custom_games;
 	}
 
 	public class CairoPreview : DrawingArea 

Modified: trunk/src/GameManager.cs
==============================================================================
--- trunk/src/GameManager.cs	(original)
+++ trunk/src/GameManager.cs	Sat May 10 13:18:06 2008
@@ -125,8 +125,22 @@
 	}
 
 	// Used from CustomGameDialog only
-	public Type[] Games {
-		get { return (Type []) games.ToArray (typeof (Type)); }
+	public Type[] CustomGames {
+		get { 
+			Type[] list = new Type [LogicPuzzles.Length + CalculationTrainers.Length + MemoryTrainers.Length];
+			int idx = 0;
+
+			for (int i = 0; i < LogicPuzzles.Length; i++, idx++)
+				list[idx] = LogicPuzzles [i];
+
+			for (int i = 0; i < CalculationTrainers.Length; i++, idx++)
+				list[idx] = CalculationTrainers [i];
+
+			for (int i = 0; i < MemoryTrainers.Length; i++, idx++)
+				list[idx] = MemoryTrainers [i];
+
+			return list;
+		}
 		set {
 			games = new ArrayList (value.Length);
 			for (int i = 0; i < value.Length; i++)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]