mirror of
				https://github.com/flynx/Slang.git
				synced 2025-10-31 11:30:13 +00:00 
			
		
		
		
	notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									e54ec2c052
								
							
						
					
					
						commit
						b927992e7f
					
				| @ -14,6 +14,7 @@ | |||||||
| <script> | <script> | ||||||
| 
 | 
 | ||||||
| // XXX add random apple and snake placement + avoid walls and other stuff... | // XXX add random apple and snake placement + avoid walls and other stuff... | ||||||
|  | // XXX normalize x/y everywhere we input coordinates... | ||||||
| var Snake = { | var Snake = { | ||||||
| 	config: { | 	config: { | ||||||
| 		apple_color: 'red', | 		apple_color: 'red', | ||||||
| @ -134,6 +135,7 @@ var Snake = { | |||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| 	// constructors... | 	// constructors... | ||||||
|  | 	// XXX normalize input x/y... | ||||||
| 	snake: function(color, x, y, direction, age){ | 	snake: function(color, x, y, direction, age){ | ||||||
| 		var head = this._cells[x + y * this.field_size.width] | 		var head = this._cells[x + y * this.field_size.width] | ||||||
| 
 | 
 | ||||||
| @ -231,7 +233,7 @@ function setup(){ | |||||||
| 	Snake | 	Snake | ||||||
| 		.setup('.snake') | 		.setup('.snake') | ||||||
| 		// setup base level... | 		// setup base level... | ||||||
| 		.wall(2, 14, 's', 7) | 		.wall(2, 10, 's', 11) | ||||||
| 		.wall(2, 5, 'e', 5) | 		.wall(2, 5, 'e', 5) | ||||||
| 		.wall(2+5, 5, 's', 5) | 		.wall(2+5, 5, 's', 5) | ||||||
| 		.wall(2+5, 5+4, 'e', 12) | 		.wall(2+5, 5+4, 'e', 12) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user