doc to create_hash_map
This commit is contained in:
		
							parent
							
								
									ca1303a8eb
								
							
						
					
					
						commit
						22dbb0e1b7
					
				@ -41,6 +41,7 @@ fn check_collisions(r: &robot::Robot, h: &HashMap<robot::Position, u32>) -> Resu
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Creates HashMap of robot position and it's id.
 | 
			
		||||
fn create_hash_map(pool: &Vec<robot::Robot>, hash: &mut HashMap<robot::Position, u32>) {
 | 
			
		||||
    for r in pool {
 | 
			
		||||
        hash.insert(robot::Position { x: r.p.x, y: r.p.y }, r.id);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user