()
| 56 | } |
| 57 | |
| 58 | public move(): void{ |
| 59 | if(this.weAreWaiting == false){ |
| 60 | // We make the smoke going up |
| 61 | this.yGap--; |
| 62 | |
| 63 | // If it's too high, we call init() |
| 64 | if(-this.yGap >= this.height){ |
| 65 | this.init(); |
| 66 | } |
| 67 | // Else we invert it |
| 68 | else{ |
| 69 | this.inverted = !this.inverted; |
| 70 | } |
| 71 | } |
| 72 | else{ |
| 73 | this.currentWaitingTime++; |
| 74 | if(this.currentWaitingTime > this.chosenWaitingTime) |
| 75 | this.weAreWaiting = false; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | // Private methods |
| 80 | private init(weMustBeWaitingAtFirst: boolean = true): void{ |
no test coverage detected