Use priority queue for next move to make in mazes.

This is the proper data structure to use.
No more of this regularly resorting a vector rubbish.
This commit is contained in:
Juergen Stuber
2018-12-03 20:20:04 +01:00
parent 292ebed18d
commit e60c0b26eb
4 changed files with 36 additions and 8 deletions

View File

@ -2,7 +2,7 @@ use std::ops::Add;
use crate::vec2d::Vec2d;
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct Point2d {
pub x: i32,
pub y: i32,