Compare commits
1 Commits
main
...
e1b7b3870e
| Author | SHA1 | Date | |
|---|---|---|---|
| e1b7b3870e |
14
src/main.rs
14
src/main.rs
@@ -117,14 +117,14 @@ impl Leds {
|
|||||||
|
|
||||||
pub fn for_direction(&mut self, direction: &Direction) -> &mut Led {
|
pub fn for_direction(&mut self, direction: &Direction) -> &mut Led {
|
||||||
match direction {
|
match direction {
|
||||||
Direction::North => &mut self.ld3,
|
Direction::North => &mut self.ld3, // done
|
||||||
Direction::NorthEast => &mut self.ld5,
|
Direction::NorthEast => &mut self.ld5, // done
|
||||||
Direction::East => &mut self.ld7,
|
Direction::East => &mut self.ld7, // done
|
||||||
Direction::SouthEast => &mut self.ld9,
|
Direction::SouthEast => &mut self.ld9,
|
||||||
Direction::South => &mut self.ld10,
|
Direction::South => &mut self.ld8,
|
||||||
Direction::SouthWest => &mut self.ld8,
|
Direction::SouthWest => &mut self.ld10,
|
||||||
Direction::West => &mut self.ld6,
|
Direction::West => &mut self.ld6, // done
|
||||||
Direction::NorthWest => &mut self.ld4,
|
Direction::NorthWest => &mut self.ld4, // done
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user