summaryrefslogtreecommitdiff
path: root/src/cell.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cell.rs')
-rw-r--r--src/cell.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cell.rs b/src/cell.rs
index 6b42fdf..1659289 100644
--- a/src/cell.rs
+++ b/src/cell.rs
@@ -11,7 +11,7 @@ pub enum Occupant {
Green,
Yellow,
Red,
- Diamond,
+ Blue,
Explosion,
}
@@ -24,12 +24,12 @@ impl Default for Occupant {
impl Occupant {
pub fn to_index(&self) -> u32 {
match self {
- Occupant::Green => 0,
- Occupant::Yellow => 1,
- Occupant::Red => 2,
- Occupant::Diamond => 3,
- Occupant::Explosion => 4,
- Occupant::None => 13,
+ Occupant::Green => constants::TILESHEET_GREEN,
+ Occupant::Yellow => constants::TILESHEET_YELLOW,
+ Occupant::Red => constants::TILESHEET_RED,
+ Occupant::Blue => constants::TILESHEET_BLUE,
+ Occupant::Explosion => constants::TILESHEET_EXPLOSION1,
+ Occupant::None => constants::TILESHEET_NONE1,
}
}
}
@@ -39,7 +39,7 @@ impl Distribution<Occupant> for Standard {
match rng.gen_range(0..=3) {
0 => Occupant::Green,
1 => Occupant::Yellow,
- 2 => Occupant::Diamond,
+ 2 => Occupant::Blue,
3 => Occupant::Red,
_ => Occupant::None,
}