mirror of
				https://github.com/flynx/Course-JavaScript.git
				synced 2025-10-29 19:10:09 +00:00 
			
		
		
		
	bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									6a99c057f8
								
							
						
					
					
						commit
						8e0b6e244f
					
				| @ -94,7 +94,7 @@ var Snake = { | |||||||
| 				var next =  | 				var next =  | ||||||
| 					direction == 'n' ? (i < w ? l - w + i : i - w) | 					direction == 'n' ? (i < w ? l - w + i : i - w) | ||||||
| 					// XXX BUG: this returns 256 when at x = 0... | 					// XXX BUG: this returns 256 when at x = 0... | ||||||
| 					: direction == 's' ? (i > (l-w) ? i - (l-w) : i + w) | 					: direction == 's' ? (i > (l-w-1) ? i - (l-w) : i + w) | ||||||
| 					: direction == 'e' ? ((i+1)%w == 0 ? i - (w-1) : i + 1) | 					: direction == 'e' ? ((i+1)%w == 0 ? i - (w-1) : i + 1) | ||||||
| 					: direction == 'w' ? (i%w == 0 ? i + (w-1) : i - 1) | 					: direction == 'w' ? (i%w == 0 ? i + (w-1) : i - 1) | ||||||
| 					: null  | 					: null  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user