[gbrainy] Expected time for verbal analogies down to 30 seconds
- From: Jordi Mas <jmas src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gbrainy] Expected time for verbal analogies down to 30 seconds
- Date: Fri, 25 Dec 2009 20:36:27 +0000 (UTC)
commit 27155e054665f23bdb0b865608ad202d78c26c91
Author: Jordi Mas <jmas softcatala org>
Date: Fri Dec 25 21:31:58 2009 +0100
Expected time for verbal analogies down to 30 seconds
src/Core/Main/Game.cs | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/Core/Main/Game.cs b/src/Core/Main/Game.cs
index d43b606..1937d2a 100644
--- a/src/Core/Main/Game.cs
+++ b/src/Core/Main/Game.cs
@@ -190,8 +190,8 @@ namespace gbrainy.Core.Main
set {game_time = value; }
}
- // Average time in seconds that a player is expected to complete this game
- public int AverageTime {
+ // Expected time in seconds that a player is expected to complete this game
+ public int ExpectedTime {
get {
double factor;
@@ -213,13 +213,15 @@ namespace gbrainy.Core.Main
return (int) (30 * factor);
case Types.MathTrainer:
return (int) (60 * factor);
+ case Types.VerbalAnalogy:
+ return (int) (30 * factor);
}
return (int) (120 * factor); // Default for all games (logic)
}
}
//
- // Score algorithm return a value between 0 and 10
+ // Score algorithm returns a value between 0 and 10
//
public virtual int Score (string answer)
{
@@ -232,12 +234,12 @@ namespace gbrainy.Core.Main
score = 10;
// Time
- if (seconds > AverageTime * 3) {
+ if (seconds > ExpectedTime * 3) {
score = score * 0.6;
}
- else if (seconds > AverageTime * 2) {
+ else if (seconds > ExpectedTime * 2) {
score = score * 0.7;
- } else if (seconds > AverageTime) {
+ } else if (seconds > ExpectedTime) {
score = score * 0.8;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]