Skip to content

mazes WIP #7709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/css/bootcamp/exercises/maze.css
Original file line number Diff line number Diff line change
@@ -71,22 +71,22 @@
background: radial-gradient(
circle,
transparent 20%,
#f9dcdc 20%,
#f9dcdc 80%,
#dcdef9 20%,
#dcdef9 80%,
transparent 80%,
transparent
),
radial-gradient(
circle,
transparent 20%,
#f9dcdc 20%,
#f9dcdc 80%,
#dcdef9 20%,
#dcdef9 80%,
transparent 80%,
transparent
)
10px 10px,
linear-gradient(#f74545 0.8px, transparent 0.8px) 0 -0.4px,
linear-gradient(90deg, #f74545 0.8px, #f9dcdc 0.8px) -0.4px 0;
linear-gradient(#6645f7 0.8px, transparent 0.8px) 0 -0.4px,
linear-gradient(90deg, #6645f7 0.8px, #dcdef9 0.8px) -0.4px 0;
background-size: 10px 10px, 10px 10px, 5px 5px, 5px 5px;
}
&.start {
Original file line number Diff line number Diff line change
@@ -520,6 +520,9 @@ export default class MazeExercise extends Exercise {
this.character.style.left = `${this.characterPosition.x * this.squareSize}%`
this.character.style.top = `${this.characterPosition.y * this.squareSize}%`
}
public getLayout(_: ExecutionContext): SquareInstance[][] {
return Jiki.wrapJSToJikiObject(this.mazeLayout)
}
public announceEmojis(_: ExecutionContext, emojis: Jiki.Dictionary) {
this.collectedEmojis = Jiki.unwrapJikiObject(emojis)
}
@@ -575,5 +578,10 @@ export default class MazeExercise extends Exercise {
func: this.removeEmoji.bind(this),
description: 'removed the emoji from the current square',
},
{
name: 'get_layout',
func: this.getLayout.bind(this),
description: 'got the current layout of the maze',
},
]
}
3 changes: 2 additions & 1 deletion bootcamp_content/projects/maze/config.json
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
"look-around",
"emoji-collector",
"squares-not-strings",
"omniscience"
"omniscience",
"classy-maze"
]
}
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@
],
"checks": [
{
"property": "position",
"function": "new Maze(get_layout())",
"value": [4, 6],
"error_html": "You didn't reach the end of the maze."
}
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.