-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix/pathfinding #95
Fix/pathfinding #95
Conversation
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.
Nice fix! Some questions:
- If we could enhance the printer to use the "_" and "|" that could be better to ensure we have one unified way to represent the maps including in the comment.
Nice to have moved comment doc into interfaces. 👍
/// * The heap is printed | ||
/// # Note | ||
/// * This function is only for debugging purposes | ||
fn print(ref self: Heap<T>); |
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.
This function could be relocated into the printer module to only be added for testing. Or do you need this to be used in katana?
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.
I agree with you that it is not consistent with MapPrinter, but I feel like the Type itself should be responsible of how it should render, so it makes sense to me to have it at the type definition location.
If you want to use it for a pure cairo purpose it seems ok to have it directly in the type, if it is for a Starknet purpose it will fail at the compilation time, right?
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.
Sounds good to me, that's a good vision on that point, thanks for sharing that.
Yes, now sozo displays a warning, before it wasn't. So it makes it easy anyway to see that you've a print in production code.
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.
Can tackled modifications in other PR as you mentioned you'll rework the crate.
Co-authored-by: notV4l <122404722+notV4l@users.noreply.github.com>
Introduced changes