Simplified some code.
This commit is contained in:
		
							parent
							
								
									bfec223da1
								
							
						
					
					
						commit
						10962c4da0
					
				
					 1 changed files with 2 additions and 12 deletions
				
			
		
							
								
								
									
										14
									
								
								sketch.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								sketch.js
									
									
									
									
									
								
							|  | @ -85,18 +85,8 @@ function draw() { | ||||||
| 
 | 
 | ||||||
|         //ADDING SCORE WHEN BALL HITS TILES
 |         //ADDING SCORE WHEN BALL HITS TILES
 | ||||||
| 
 | 
 | ||||||
|         if (j === 5) { |         if (j >= 0 && j <= 6) { | ||||||
|           score += 1 |           score += 6 - j | ||||||
|         } else if (j === 4) { |  | ||||||
|           score += 2 |  | ||||||
|         } else if (j === 3) { |  | ||||||
|           score += 3 |  | ||||||
|         } else if (j === 2) { |  | ||||||
|           score += 4 |  | ||||||
|         } else if (j === 1) { |  | ||||||
|           score += 5 |  | ||||||
|         } else if (j === 0) { |  | ||||||
|           score += 6 |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|       } |       } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue