mirror of
				https://github.com/onyx-and-iris/aoc2024.git
				synced 2025-11-03 22:41:46 +00:00 
			
		
		
		
	clean up function
This commit is contained in:
		
							parent
							
								
									83399a45c2
								
							
						
					
					
						commit
						4013cd6c7f
					
				@ -2,13 +2,13 @@ package one
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func neighbours(p point) [8]point {
 | 
					func neighbours(p point) [8]point {
 | 
				
			||||||
	return [8]point{
 | 
						return [8]point{
 | 
				
			||||||
		{y: p.y - 1, x: p.x, direction: N},
 | 
							{p.x, p.y - 1, N},
 | 
				
			||||||
		{y: p.y - 1, x: p.x + 1, direction: NE},
 | 
							{p.x + 1, p.y - 1, NE},
 | 
				
			||||||
		{y: p.y, x: p.x + 1, direction: E},
 | 
							{p.x + 1, p.y, E},
 | 
				
			||||||
		{y: p.y + 1, x: p.x + 1, direction: SE},
 | 
							{p.x + 1, p.y + 1, SE},
 | 
				
			||||||
		{y: p.y + 1, x: p.x, direction: S},
 | 
							{p.x, p.y + 1, S},
 | 
				
			||||||
		{y: p.y + 1, x: p.x - 1, direction: SW},
 | 
							{p.x - 1, p.y + 1, SW},
 | 
				
			||||||
		{y: p.y, x: p.x - 1, direction: W},
 | 
							{p.x - 1, p.y, W},
 | 
				
			||||||
		{y: p.y - 1, x: p.x - 1, direction: NW},
 | 
							{p.x - 1, p.y - 1, NW},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user