Skip to content

Commit 63ce221

Browse files
author
Jegors Cemisovs
committed
Update exercise metadata and add validation for maze dimensions
Renamed exercise from "maze" to "mazy-mice" in metadata. Added new validation rule enforcing rows and columns to be within 5 to 100, along with a test case for rows less than the minimum allowed.
1 parent 416803e commit 63ce221

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

exercises/mazy-mice/canonican-data.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"exercise": "maze",
2+
"exercise": "mazy-mice",
33
"comments": [
44
"The following checks should be considered: ",
55
" ",
@@ -16,7 +16,8 @@
1616
"The maze is random: ",
1717
" - the maze is different each time it is generated ",
1818
" - the maze is the same if the same seed is used ",
19-
" - two mazes with different seeds should not be equal "
19+
" - two mazes with different seeds should not be equal ",
20+
"The rows and cols must be between 5 and 100 "
2021
],
2122
"cases": [
2223
{
@@ -163,6 +164,18 @@
163164
"seed": 123
164165
},
165166
"expected": true
167+
},
168+
{
169+
"uuid": "b2f1a0e5-1c3a-4d5e-9f2b-8a7b6c5d4e3f",
170+
"description": "Error: rows less than 5",
171+
"property": "generateMaze",
172+
"input": {
173+
"rows": 4,
174+
"cols": 10
175+
},
176+
"expected": {
177+
"error": "rows must be between 5 and 100"
178+
}
166179
}
167180
]
168181
}

0 commit comments

Comments
 (0)