| 41 | } |
| 42 | |
| 43 | getColor(index: number) { |
| 44 | if (index <3 || index > this.sinks.length - 3) { |
| 45 | return {background: '#ff003f', color: 'white'}; |
| 46 | } |
| 47 | if (index < 6 || index > this.sinks.length - 6) { |
| 48 | return {background: '#ff7f00', color: 'white'}; |
| 49 | } |
| 50 | if (index < 9 || index > this.sinks.length - 9) { |
| 51 | return {background: '#ffbf00', color: 'black'}; |
| 52 | } |
| 53 | if (index < 12 || index > this.sinks.length - 12) { |
| 54 | return {background: '#ffff00', color: 'black'}; |
| 55 | } |
| 56 | if (index < 15 || index > this.sinks.length - 15) { |
| 57 | return {background: '#bfff00', color: 'black'}; |
| 58 | } |
| 59 | return {background: '#7fff00', color: 'black'}; |
| 60 | } |
| 61 | drawSinks() { |
| 62 | this.ctx.fillStyle = 'green'; |
| 63 | const SPACING = obstacleRadius * 2; |