Skip to content

Commit

Permalink
fixing format
Browse files Browse the repository at this point in the history
  • Loading branch information
ddevin96 committed Jun 4, 2024
1 parent fe599d9 commit fd2fe50
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ members = [
"flockers_mpi",
"forestfire",
"forestfire_bayesian",
"gis",
"schelling",
"sir_ga_exploration",
"sugarscape",
"template",
"virusnetwork",
"wolfsheepgrass",
"gis",
]
3 changes: 1 addition & 2 deletions gis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ readme = "README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
krabmaga = {path="../../krABMaga"}
rand = "0.8"
krabmaga = "0.5.*"

[features]
visualization = ["krabmaga/visualization"]
Expand Down
4 changes: 1 addition & 3 deletions gis/src/model/person.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use krabmaga::engine::agent::Agent;
use krabmaga::engine::fields::field_2d::Location2D;
use krabmaga::engine::location::{Int2D, Real2D};
use krabmaga::engine::state::State;
use rand::Rng;
use std::hash::{Hash, Hasher};

// The Direction of the person
Expand Down Expand Up @@ -43,7 +42,6 @@ impl Person {

for dx in -1..2 {
for dy in -1..2 {

let new_x = dx + x;
let new_y = dy + y;
if map.gis_value(Int2D { x: new_x, y: new_y }) == 1 {
Expand All @@ -62,7 +60,7 @@ impl Person {
}
}
}

match curr_direction {
Some(Direction::Left) => {
if possible_direction.contains(&Direction::Left) {
Expand Down

0 comments on commit fd2fe50

Please sign in to comment.