Improve colors
This commit is contained in:
parent
3455559d33
commit
4341bdc682
@ -225,9 +225,16 @@ impl GameScreen {
|
||||
// Current shoot position
|
||||
if opponent_map {
|
||||
map_widget = map_widget.add_colored_cells(ColoredCells {
|
||||
color: match self.game.can_fire_at_location(self.curr_shoot_position) {
|
||||
true => Color::Green,
|
||||
false => Color::LightYellow,
|
||||
color: match (
|
||||
self.game.can_fire_at_location(self.curr_shoot_position),
|
||||
self.game
|
||||
.opponent_map
|
||||
.successful_strikes
|
||||
.contains(&self.curr_shoot_position),
|
||||
) {
|
||||
(true, _) => Color::Green,
|
||||
(false, false) => Color::LightYellow,
|
||||
(false, true) => Color::LightRed,
|
||||
},
|
||||
cells: vec![self.curr_shoot_position],
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user