Can get opponent last fire location

This commit is contained in:
2022-10-15 16:33:45 +02:00
parent b832ef82ed
commit a2c880814c
2 changed files with 15 additions and 1 deletions

View File

@ -85,6 +85,10 @@ impl Coordinates {
}
}
pub fn invalid() -> Self {
Self { x: -1, y: -1 }
}
pub fn is_valid(&self, rules: &GameRules) -> bool {
self.x >= 0
&& self.y >= 0