From 2d9f0869c52f7b198c2182e0cf827139999551dc Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 13 Jun 2019 03:15:54 +0800 Subject: [PATCH 01/14] [Darts] Slim down generated method names --- exercises/darts/canonical-data.json | 90 ++++++++++++++++++++--------- 1 file changed, 63 insertions(+), 27 deletions(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index 41e4344af4..df8e8b1714 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -2,12 +2,12 @@ "exercise": "darts", "version": "2.0.0", "comments": [ - "Return the correct amount earned by a dart landing in a given point in the target problem" + "Return the correct amount earned by a dart landing in a given point in the target." ], "cases": [ { "property": "score", - "description": "A dart lands outside the target", + "description": "Dart missed target", "input": { "x": -9, "y": 9 @@ -16,7 +16,7 @@ }, { "property": "score", - "description": "A dart lands just in the border of the target", + "description": "Outer region, dart on border", "input": { "x": 0, "y": 10 @@ -25,25 +25,43 @@ }, { "property": "score", - "description": "A dart lands in the outer circle", + "description": "Middle region, dart on border", "input": { - "x": 4, - "y": 4 + "x": -5, + "y": 0 }, - "expected": 1 + "expected": 5 }, { "property": "score", - "description": "A dart lands right in the border between outer and middle circles", + "description": "Inner region, dart on border", "input": { - "x": 5, - "y": 0 + "x": 0, + "y": -1 }, - "expected": 5 + "expected": 10 + }, + { + "property": "score", + "description": "Inner region, dart far inside", + "input": { + "x": -0.1, + "y": -0.1 + }, + "expected": 10 + }, + { + "property": "score", + "description": "Inner-Middle border, dart just inside", + "input": { + "x": 0.7, + "y": 0.7 + }, + "expected": 1 }, { "property": "score", - "description": "A dart lands in the middle circle", + "description": "Inner-Middle border, dart just outside", "input": { "x": 0.8, "y": -0.8 @@ -52,25 +70,43 @@ }, { "property": "score", - "description": "A dart lands right in the border between middle and inner circles", + "description": "Middle-Outer border, dart just inside", "input": { - "x": 0, - "y": -1 + "x": -3.5, + "y": 3.5 }, - "expected": 10 - }, + "expected": 5 + }, { "property": "score", - "description": "A dart lands in the inner circle", + "description": "Middle-Outer border, dart just outside", "input": { - "x": -0.1, - "y": -0.1 + "x": -3.6, + "y": -3.6 }, - "expected": 10 - }, + "expected": 1 + }, + { + "property": "score", + "description": "Outer border, dart just inside", + "input": { + "x": -7.0, + "y": 7.0 + }, + "expected": 1 + }, + { + "property": "score", + "description": "Outer border, dart just outside", + "input": { + "x": 7.1, + "y": -7.1 + }, + "expected": 0 + }, { "property": "score", - "description": "A dart whose coordinates sum to > 1 but whose radius to origin is <= 1 is scored in the inner circle", + "description": "Inner region dart, asymmetric position", "input": { "x": 0.4, "y": 0.8 @@ -79,19 +115,19 @@ }, { "property": "score", - "description": "A dart whose coordinates sum to > 5 but whose radius to origin is <= 5 is scored in the middle circle", + "description": "Middle region dart, asymmetric position", "input": { - "x": 2, + "x": -2, "y": 4 }, "expected": 5 }, { "property": "score", - "description": "A dart whose coordinates sum to > 10 but whose radius to origin is <= 10 is scored in the outer circle", + "description": "Outer region dart, asymmetric position", "input": { "x": 4, - "y": 8 + "y": -8 }, "expected": 1 } From 5cbbf23892fc525ae25c84882652b702b97062f6 Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 13 Jun 2019 03:58:44 +0800 Subject: [PATCH 02/14] bump minor version --- exercises/darts/canonical-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index df8e8b1714..b9c65e6a49 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -1,6 +1,6 @@ { "exercise": "darts", - "version": "2.0.0", + "version": "2.1.0", "comments": [ "Return the correct amount earned by a dart landing in a given point in the target." ], From 6848fb7a5fac15c725a43b82abbea90f9b9407fd Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 13 Jun 2019 19:49:44 +0800 Subject: [PATCH 03/14] lowercase second region Co-Authored-By: Erik Schierboom --- exercises/darts/canonical-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index b9c65e6a49..3cf2a9674e 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -52,7 +52,7 @@ }, { "property": "score", - "description": "Inner-Middle border, dart just inside", + "description": "Inner-middle border, dart just inside", "input": { "x": 0.7, "y": 0.7 From 1f804c317e75c48576c52106dd00df442aa26ca6 Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 13 Jun 2019 19:49:59 +0800 Subject: [PATCH 04/14] lowercase second region Co-Authored-By: Erik Schierboom --- exercises/darts/canonical-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index 3cf2a9674e..5ca1b84230 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -70,7 +70,7 @@ }, { "property": "score", - "description": "Middle-Outer border, dart just inside", + "description": "Middle-outer border, dart just inside", "input": { "x": -3.5, "y": 3.5 From 4e2deeae34e757a7cf697b258325ebb416469892 Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 13 Jun 2019 19:50:55 +0800 Subject: [PATCH 05/14] lowercase second region Co-Authored-By: Erik Schierboom --- exercises/darts/canonical-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index 5ca1b84230..ac60a867a5 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -79,7 +79,7 @@ }, { "property": "score", - "description": "Middle-Outer border, dart just outside", + "description": "Middle-outer border, dart just outside", "input": { "x": -3.6, "y": -3.6 From 49d207bc9f646ec31def18a670506dc5e28283c2 Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 13 Jun 2019 19:51:05 +0800 Subject: [PATCH 06/14] lowercase second region Co-Authored-By: Erik Schierboom --- exercises/darts/canonical-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index ac60a867a5..e61da93476 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -61,7 +61,7 @@ }, { "property": "score", - "description": "Inner-Middle border, dart just outside", + "description": "Inner-middle border, dart just outside", "input": { "x": 0.8, "y": -0.8 From af471c82262356fc98fbb8afd6391c9a1b7b342a Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 13 Jun 2019 20:18:48 +0800 Subject: [PATCH 07/14] Remove redundant 'darts' term I was finding the sub-word repetition of "inside inner-middle" & "outside middle-outer" slightly brain bending. Had an inspiration to substitute "within" & "beyond". Not strongly tied to it, just sharing for your thoughts. --- exercises/darts/canonical-data.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index e61da93476..bb6a6f8fdb 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -16,7 +16,7 @@ }, { "property": "score", - "description": "Outer region, dart on border", + "description": "On outer border", "input": { "x": 0, "y": 10 @@ -25,7 +25,7 @@ }, { "property": "score", - "description": "Middle region, dart on border", + "description": "On middle-outer border", "input": { "x": -5, "y": 0 @@ -34,7 +34,7 @@ }, { "property": "score", - "description": "Inner region, dart on border", + "description": "On inner-middle border", "input": { "x": 0, "y": -1 @@ -43,7 +43,7 @@ }, { "property": "score", - "description": "Inner region, dart far inside", + "description": "Far inside inner region", "input": { "x": -0.1, "y": -0.1 @@ -52,7 +52,7 @@ }, { "property": "score", - "description": "Inner-middle border, dart just inside", + "description": "Just within inner-middle border", "input": { "x": 0.7, "y": 0.7 @@ -61,7 +61,7 @@ }, { "property": "score", - "description": "Inner-middle border, dart just outside", + "description": "Just beyond inner-middle border", "input": { "x": 0.8, "y": -0.8 @@ -70,7 +70,7 @@ }, { "property": "score", - "description": "Middle-outer border, dart just inside", + "description": "Just within middle-outer border", "input": { "x": -3.5, "y": 3.5 @@ -79,7 +79,7 @@ }, { "property": "score", - "description": "Middle-outer border, dart just outside", + "description": "Just beyond middle-outer border", "input": { "x": -3.6, "y": -3.6 @@ -88,7 +88,7 @@ }, { "property": "score", - "description": "Outer border, dart just inside", + "description": "Just within outer border", "input": { "x": -7.0, "y": 7.0 @@ -97,7 +97,7 @@ }, { "property": "score", - "description": "Outer border, dart just outside", + "description": "Just beyond outer border", "input": { "x": 7.1, "y": -7.1 @@ -106,7 +106,7 @@ }, { "property": "score", - "description": "Inner region dart, asymmetric position", + "description": "Asymetric position within inner region", "input": { "x": 0.4, "y": 0.8 @@ -115,7 +115,7 @@ }, { "property": "score", - "description": "Middle region dart, asymmetric position", + "description": "Asymetric position within middle region", "input": { "x": -2, "y": 4 @@ -124,7 +124,7 @@ }, { "property": "score", - "description": "Outer region dart, asymmetric position", + "description": "Asymmetric position within outer region", "input": { "x": 4, "y": -8 From 949a8177672c2ff143807eabf21854a040327f9b Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 13 Jun 2019 22:01:15 +0800 Subject: [PATCH 08/14] darts: near centre --- exercises/darts/canonical-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index bb6a6f8fdb..bf8d842a5d 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -43,7 +43,7 @@ }, { "property": "score", - "description": "Far inside inner region", + "description": "Near centre", "input": { "x": -0.1, "y": -0.1 From ff8d326befe3b4810d50903a8bf296fc9cd02761 Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 13 Jun 2019 22:12:11 +0800 Subject: [PATCH 09/14] darts: homogenize descriptions --- exercises/darts/canonical-data.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index bf8d842a5d..215bcdf1a2 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -16,7 +16,7 @@ }, { "property": "score", - "description": "On outer border", + "description": "On outer circle", "input": { "x": 0, "y": 10 @@ -25,7 +25,7 @@ }, { "property": "score", - "description": "On middle-outer border", + "description": "On middle circle", "input": { "x": -5, "y": 0 @@ -34,7 +34,7 @@ }, { "property": "score", - "description": "On inner-middle border", + "description": "On inner circle", "input": { "x": 0, "y": -1 @@ -52,16 +52,16 @@ }, { "property": "score", - "description": "Just within inner-middle border", + "description": "Just within inner circle", "input": { "x": 0.7, "y": 0.7 }, - "expected": 1 + "expected": 10 }, { "property": "score", - "description": "Just beyond inner-middle border", + "description": "Just beyond inner circle", "input": { "x": 0.8, "y": -0.8 @@ -70,7 +70,7 @@ }, { "property": "score", - "description": "Just within middle-outer border", + "description": "Just within middle circle", "input": { "x": -3.5, "y": 3.5 @@ -79,7 +79,7 @@ }, { "property": "score", - "description": "Just beyond middle-outer border", + "description": "Just beyond middle circle", "input": { "x": -3.6, "y": -3.6 @@ -88,7 +88,7 @@ }, { "property": "score", - "description": "Just within outer border", + "description": "Just within outer circle", "input": { "x": -7.0, "y": 7.0 @@ -97,7 +97,7 @@ }, { "property": "score", - "description": "Just beyond outer border", + "description": "Just beyond outer circle", "input": { "x": 7.1, "y": -7.1 @@ -106,7 +106,7 @@ }, { "property": "score", - "description": "Asymetric position within inner region", + "description": "Asymetric position within inner circle", "input": { "x": 0.4, "y": 0.8 @@ -115,7 +115,7 @@ }, { "property": "score", - "description": "Asymetric position within middle region", + "description": "Asymetric position between inner and middle circles", "input": { "x": -2, "y": 4 @@ -124,7 +124,7 @@ }, { "property": "score", - "description": "Asymmetric position within outer region", + "description": "Asymmetric position between middle and outer circles", "input": { "x": 4, "y": -8 From 2f71f0332fe0f96008842fc00158b74d3cc333eb Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Fri, 14 Jun 2019 08:09:41 +0800 Subject: [PATCH 10/14] Apply suggestions from code review Co-Authored-By: Erik Schierboom --- exercises/darts/canonical-data.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index 215bcdf1a2..1c7a131e64 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -7,7 +7,7 @@ "cases": [ { "property": "score", - "description": "Dart missed target", + "description": "Missed target", "input": { "x": -9, "y": 9 @@ -106,7 +106,7 @@ }, { "property": "score", - "description": "Asymetric position within inner circle", + "description": "Asymmetric position within inner circle", "input": { "x": 0.4, "y": 0.8 @@ -115,7 +115,7 @@ }, { "property": "score", - "description": "Asymetric position between inner and middle circles", + "description": "Asymmetric position between inner and middle circles", "input": { "x": -2, "y": 4 From a40abff839ab44660e3c5bb24adda505d5fc732a Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Thu, 20 Jun 2019 23:37:15 +0800 Subject: [PATCH 11/14] One asymmetric test should do --- exercises/darts/canonical-data.json | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index 1c7a131e64..bab52e8367 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -104,32 +104,14 @@ }, "expected": 0 }, - { - "property": "score", - "description": "Asymmetric position within inner circle", - "input": { - "x": 0.4, - "y": 0.8 - }, - "expected": 10 - }, { "property": "score", "description": "Asymmetric position between inner and middle circles", "input": { - "x": -2, - "y": 4 + "x": 0.5, + "y": -4 }, "expected": 5 - }, - { - "property": "score", - "description": "Asymmetric position between middle and outer circles", - "input": { - "x": 4, - "y": -8 - }, - "expected": 1 } ] } From c9a5995f2d3af268baa141000e466a386fd324c5 Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Sun, 30 Jun 2019 22:54:45 +0800 Subject: [PATCH 12/14] minor grammar Thx @SleeplessByte. Co-Authored-By: Derk-Jan Karrenbeld --- exercises/darts/canonical-data.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index bab52e8367..78c053c2ca 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -2,7 +2,7 @@ "exercise": "darts", "version": "2.1.0", "comments": [ - "Return the correct amount earned by a dart landing in a given point in the target." + "Return the correct amount earned by a dart's landing position." ], "cases": [ { @@ -16,7 +16,7 @@ }, { "property": "score", - "description": "On outer circle", + "description": "On the outer circle", "input": { "x": 0, "y": 10 @@ -25,7 +25,7 @@ }, { "property": "score", - "description": "On middle circle", + "description": "On the middle circle", "input": { "x": -5, "y": 0 @@ -34,7 +34,7 @@ }, { "property": "score", - "description": "On inner circle", + "description": "On the inner circle", "input": { "x": 0, "y": -1 @@ -43,7 +43,7 @@ }, { "property": "score", - "description": "Near centre", + "description": "Near the centre", "input": { "x": -0.1, "y": -0.1 @@ -52,7 +52,7 @@ }, { "property": "score", - "description": "Just within inner circle", + "description": "Just within the inner circle", "input": { "x": 0.7, "y": 0.7 @@ -61,7 +61,7 @@ }, { "property": "score", - "description": "Just beyond inner circle", + "description": "Just outside the inner circle", "input": { "x": 0.8, "y": -0.8 @@ -70,7 +70,7 @@ }, { "property": "score", - "description": "Just within middle circle", + "description": "Just within the middle circle", "input": { "x": -3.5, "y": 3.5 @@ -79,7 +79,7 @@ }, { "property": "score", - "description": "Just beyond middle circle", + "description": "Just outside the middle circle", "input": { "x": -3.6, "y": -3.6 @@ -88,7 +88,7 @@ }, { "property": "score", - "description": "Just within outer circle", + "description": "Just within the outer circle", "input": { "x": -7.0, "y": 7.0 @@ -97,7 +97,7 @@ }, { "property": "score", - "description": "Just beyond outer circle", + "description": "Just outside the outer circle", "input": { "x": 7.1, "y": -7.1 @@ -106,7 +106,7 @@ }, { "property": "score", - "description": "Asymmetric position between inner and middle circles", + "description": "Asymmetric position between the inner and middle circles", "input": { "x": 0.5, "y": -4 From 429fd4e135520d11c6bcd8efcda7b11754358088 Mon Sep 17 00:00:00 2001 From: Ryan Potts Date: Sun, 30 Jun 2019 12:46:00 -0400 Subject: [PATCH 13/14] add missing property Score My apologizes for all the churn. --- exercises/darts/canonical-data.json | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index 79124f09f5..7511f27b5d 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -42,6 +42,7 @@ "expected": 10 }, { + "property": "score", "description": "Exactly on centre", "input": { "x": 0, From f0bfad2a4ad895dd4203ed8261d0b8cf53ee0d74 Mon Sep 17 00:00:00 2001 From: Ben Coman Date: Mon, 1 Jul 2019 07:19:30 +0800 Subject: [PATCH 14/14] Bump minor version --- exercises/darts/canonical-data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/darts/canonical-data.json b/exercises/darts/canonical-data.json index 7511f27b5d..e03af88558 100644 --- a/exercises/darts/canonical-data.json +++ b/exercises/darts/canonical-data.json @@ -1,6 +1,6 @@ { "exercise": "darts", - "version": "2.1.0", + "version": "2.2.0", "comments": [ "Return the correct amount earned by a dart's landing position." ],