-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/generate levels graph #6
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
Conversation
Still missing some documentation and some UTs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole directory structure is a bit weird - there's some remainders from the refactor.
@@ -0,0 +1,163 @@ | |||
use log::{debug, info}; | |||
use petgraph::algo::is_cyclic_directed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or is it? My rustc shows that it's unused, but it's there in line 113. Weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's part of the tests - not compiled directly to the output binary. Moved the import into mod tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments
levels/game-config.toml
Outdated
branch = "master" | ||
solution_checker = "echo No pushing to master. Read the README file; exit 1" | ||
flags = [] # ["start-here"], but it's implicit in the readme | ||
flags = ["start-here"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of trailing whitespace at the end :)
https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scripts/src/bin/templates/graph.tmpl
Outdated
if (1 == params.nodes.length) \{ | ||
levelName = data.nodes[params.nodes[0]].label; | ||
console.log("Clicked on one node, it's this node: " + levelName); | ||
document.location.href = "http://localhost:1313/levels/" + levelName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a script parameter for prod/test, switching the href
assignment accordingly
See commit messages.
The result looks like this: