[chronojump/michrolab] Networks can download an infinite jumpRj type
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/michrolab] Networks can download an infinite jumpRj type
- Date: Thu, 6 Oct 2022 10:52:53 +0000 (UTC)
commit 7f36ce07561fa630fa3e34702421a33e14af46fb
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]