leftiness / hex_math

MIT License
4 stars 1 forks source link

Prism wall strength should be pattern matched #66

Open leftiness opened 8 years ago

leftiness commented 8 years ago

Instead of saying something like strength: i32 = prism.east_wall_strength, do something more like this:

match prism.east {
  Unbreakable => println!("can't break"),
  Breakable(strength) => println!("{}", strength),
}

That does a better job of explaining the idea than setting the strength to -1 or something.

leftiness commented 7 years ago

I started on this tonight, but it quickly became tedious. See comment on #67.