mirror of
				https://github.com/onyx-and-iris/aoc2024.git
				synced 2025-11-03 22:41:46 +00:00 
			
		
		
		
	remove bounds check for first neighbour.
This commit is contained in:
		
							parent
							
								
									4013cd6c7f
								
							
						
					
					
						commit
						a282338f29
					
				@ -20,10 +20,6 @@ func Solve(buf []byte) (int, error) {
 | 
			
		||||
			current := newPoint(j, i)
 | 
			
		||||
			if graph.valueAt(current) == 'X' {
 | 
			
		||||
				for _, n := range neighbours(current) {
 | 
			
		||||
					if graph.isOutOfBounds(n) {
 | 
			
		||||
						continue
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					if checkNeighbours(graph, n, "MAS") {
 | 
			
		||||
						sum++
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user