Initial layout implementation.

This commit is contained in:
hal8174 2024-08-21 01:37:20 +02:00
parent 1596bf180d
commit f284b692cc
7 changed files with 374 additions and 6 deletions

View file

@ -128,7 +128,7 @@ impl Problem {
}
}
static COLORS: Cyclic<Color, 6> = Cyclic([
pub static COLORS: Cyclic<Color, 6> = Cyclic([
Color::Red,
Color::Green,
Color::Yellow,
@ -137,7 +137,7 @@ static COLORS: Cyclic<Color, 6> = Cyclic([
Color::Cyan,
]);
struct Cyclic<T, const N: usize>([T; N]);
pub struct Cyclic<T, const N: usize>([T; N]);
impl<T, const N: usize> Index<usize> for Cyclic<T, N> {
type Output = T;