mirror of
				https://github.com/flynx/Slang.git
				synced 2025-10-31 11:30:13 +00:00 
			
		
		
		
	cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									543cb4bba6
								
							
						
					
					
						commit
						50139f38a3
					
				| @ -270,12 +270,15 @@ var Snake = { | |||||||
| 			.wall({x:a*3, y:a*3}, 'e', a*2) | 			.wall({x:a*3, y:a*3}, 'e', a*2) | ||||||
| 			.wall({x:a*5, y:a*3}, 's', a*2) | 			.wall({x:a*5, y:a*3}, 's', a*2) | ||||||
| 			.wall({x:a*5, y:a*5}, 'e', a*6) }, | 			.wall({x:a*5, y:a*5}, 'e', a*6) }, | ||||||
|  | 	// XXX need to avoid blocked sections... | ||||||
| 	randomLevel: function(){ | 	randomLevel: function(){ | ||||||
|  | 		var a = this.field_size.width/8 | ||||||
|  | 		var b = this.field_size.height/8 | ||||||
| 		return this | 		return this | ||||||
| 			.wall(null, 's', 11) | 			.wall(null, 's', b*6) | ||||||
| 			.wall(null, 's', 11) | 			.wall(null, 's', b*6) | ||||||
| 			.wall(null, 'e', 11) | 			.wall(null, 'e', a*6) | ||||||
| 			.wall(null, 'e', 11) }, | 			.wall(null, 'e', a*6) }, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -309,8 +312,8 @@ function setup(){ | |||||||
| 		.stop() | 		.stop() | ||||||
| 		.clear() | 		.clear() | ||||||
| 
 | 
 | ||||||
| 		//.randomLevel() | 		.randomLevel() | ||||||
| 		.basicLevel() | 		//.basicLevel() | ||||||
| 
 | 
 | ||||||
| 		.appleEaten(function(){ this.apple() }) | 		.appleEaten(function(){ this.apple() }) | ||||||
| 		.apple() | 		.apple() | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user