()
| 67 | |
| 68 | // Called to know if the lolligator should be deleted or not |
| 69 | public shouldBeDeleted(): boolean{ |
| 70 | // It depends on the orientation |
| 71 | if(this.isLeft == false){ |
| 72 | // If we're too much on the right, return true |
| 73 | if(this.x + this.width > this.pondLines[this.pondLineIndex].getX2()) |
| 74 | return true; |
| 75 | return false; |
| 76 | } |
| 77 | else{ |
| 78 | // If we're too much on the left, return true |
| 79 | if(this.x < this.pondLines[this.pondLineIndex].getX1()) |
| 80 | return true; |
| 81 | return false; |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | // Called just before the lolligator is deleted |
| 86 | public willBeDeleted(): void{ |
no test coverage detected