Skip to content

Commit 41fb694

Browse files
committed
add missing expectation, instructions updates
1 parent 8efa786 commit 41fb694

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

exercises/jigsaw-puzzle/canonical-data.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@
9898
"rows": "100",
9999
"columns": "1000",
100100
"format": "square"
101+
},
102+
"expected": {
103+
"error": "Contradictory data"
101104
}
102105
},
103106
{

exercises/jigsaw-puzzle/instructions.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ The full information about the jigsaw puzzle contains the following parts:
88
- `rows`: Number of rows of pieces
99
- `columns`: Number of columns of pieces
1010
- `aspectRatio`: Aspect ratio of columns / rows
11-
- `format`: Format of the puzzle: `"portrait" / "square" / "landscape" / "globe"`
11+
- `format`: Puzzle format, which can be `portrait`, `square`, `landscape`, or `globe`
1212

13-
For the rows and columns of a puzzle globe, assume an aspect ratio of 1.0, so that rows and columns are identical.
13+
For a puzzle in `globe` format, assume an aspect ratio of 1.0.
1414

1515
Spoilt by the comfort of your helper, your friend now no longer wants to count border pieces.
16-
To help with estimating, you take the number of pieces and return an array of the possible numbers of rows and columns.
16+
To help with estimating, you take the number of pieces and return a list of the possible numbers of rows and columns.
1717

1818
Start with the lowest number of rows and work your way up from there.
1919
While a single-row jigsaw puzzle might be a strange novelty, it is theoretically possible, so you should include this case.
20+
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
Your best friend started to collect puzzles. A catalogue the collection should contain as much information as possible. After solving one of the puzzles to count the rows, columns, amount of border and inside pieces, you are tasked to provide some helper functions.
1+
# Introduction
2+
3+
Your best friend has started collecting jigsaw puzzles and wants to build a detailed catalogue for the collection — recording information like the number of pieces, rows, columns, border pieces, inside pieces, aspect ratio, and the puzzle's format.
4+
After solving one of the puzzles to figure out these details, you're now helping fill in the gaps for others in the collection, even when some data is missing.
5+

0 commit comments

Comments
 (0)