[chronojump] Networks can download an infinite jumpRj type
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Networks can download an infinite jumpRj type
- Date: Fri, 5 Aug 2022 09:03:55 +0000 (UTC)
commit 02ae49443e6a573d3429aea8e0d15cce091adcc4
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Aug 5 11:03:13 2022 +0200
Networks can download an infinite jumpRj type
src/json/compujumpJumps.cs | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/json/compujumpJumps.cs b/src/json/compujumpJumps.cs
index 0815a8188..5fe0b094d 100644
--- a/src/json/compujumpJumps.cs
+++ b/src/json/compujumpJumps.cs
@@ -99,12 +99,14 @@ public class JsonCompujumpJumps : JsonCompujump
comment = jsonSEStation ["comment"];
*/
- //TODO: think on unlimited jumps
+ //multiple jumps
if (
(jsonSE ["measurable_info"]["jump_limit"] != null &&
jsonSE ["measurable_info"]["jump_limit"] > 1) ||
(jsonSE ["measurable_info"]["time_limit"] != null &&
- jsonSE ["measurable_info"]["time_limit"] > 1) )
+ jsonSE ["measurable_info"]["time_limit"] > 1) ||
+ (jsonSE ["measurable_info"]["jump_limit"] == null &&
+ jsonSE ["measurable_info"]["time_limit"] == null) )
{
bool jumpsLimited;
double fixedValue;
@@ -113,15 +115,26 @@ public class JsonCompujumpJumps : JsonCompujump
{
jumpsLimited = true;
fixedValue = jsonSE ["measurable_info"]["jump_limit"];
- } else {
+ }
+ else if (jsonSE ["measurable_info"]["time_limit"] != null &&
+ jsonSE ["measurable_info"]["time_limit"] > 1)
+ {
jumpsLimited = false;
fixedValue = jsonSE ["measurable_info"]["time_limit"];
+ } else
+ //unlimited jump rj
+ //(jsonSE ["measurable_info"]["jump_limit"] == null &&
+ //(jsonSE ["measurable_info"]["time_limit"] == null )
+ {
+ jumpsLimited = true; //end on a jump, not in a second
+ fixedValue = -1; //unlimited
}
JumpRjExercises_l.Add (new SelectJumpRjTypes (newExId, newExName,
(bool) jsonSE ["measurable_info"]["start_inside"],
hasWeight, jumpsLimited, fixedValue, ""));
}
+ //simple jumps
else
JumpSimpleExercises_l.Add (new SelectJumpTypes (newExId, newExName,
(bool) jsonSE ["measurable_info"]["start_inside"],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]