Refactor common types.

This commit is contained in:
hal8174 2024-08-21 20:56:03 +02:00
parent f284b692cc
commit 48419b4674
14 changed files with 376 additions and 250 deletions

View file

@ -1,7 +1,8 @@
use super::{
common::{print_map, Direction, PathField, Position, PositionType},
Problem, COLORS,
common::{print_map, PathField},
Problem,
};
use crate::prelude::*;
use crate::{belt_finding::brute_force::BruteforceBuilder, misc::Map};
use std::ops::RangeInclusive;
use termcolor::ColorSpec;
@ -520,7 +521,7 @@ impl ConflictAvoidance {
}
if let Some((i, c)) = m.get(x as usize, y as usize) {
color.set_fg(Some(COLORS[*i]));
color.set_fg(Some(crate::common::color::COLORS[*i]));
(color, c)
} else if self.map.get(x as usize, y as usize).blocked {
(color, "#")