pub fn verify(&self, position: &puzzleverse_core::Point) -> bool {
    self
      .platforms
      .get(position.platform as usize)
      .map(|platform| {
        position.y < platform.length
          && position.x < platform.width
          && match platform.terrain.get(&(position.x, position.y)) {
            Some(Ground::Obstacle) => false,
            Some(Ground::GatedObstacle(gate)) => gate.load(std::sync::atomic::Ordering::Relaxed),
            Some(_) => true,
            None => false,
          }
      })
      .unwrap_or(false)
  }
/// Determine if a player can occupy this position
Determine if a player can occupy this position
Determine if a player can occupy this position
pub fn verify(&self, position: &puzzleverse_core::Point) -> bool {
    self
      .platforms
      .get(position.platform as usize)
      .map(|platform| {
        position.y < platform.length
          && position.x < platform.width
          && match platform.terrain.get(&(position.x, position.y)) {
            Some(Ground::Obstacle) => false,
            Some(Ground::GatedObstacle(gate)) => gate.load(std::sync::atomic::Ordering::Relaxed),
            Some(_) => true,
            None => false,
          }
      })
      .unwrap_or(false)
  }
pub fn verify ( & self , position : & puzzleverse_core :: Point ) -> bool { self . platforms . get ( position . platform as usize ) . map ( | platform | { position . y < platform . length && position . x < platform . width && match platform . terrain . get ( & ( position . x , position . y ) ) { Some ( Ground :: Obstacle ) => false , Some ( Ground :: GatedObstacle ( gate ) ) => gate . load ( std :: sync :: atomic :: Ordering :: Relaxed ) , Some ( _ ) => true , None => false , } } ) . unwrap_or ( false ) }
Determine if a player can occupy this position
Determine if a player can occupy this position
&self
position
&puzzleverse_core::Point
&self
position
&puzzleverse_core::Point