MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / shouldBeDeleted

Method shouldBeDeleted

code/main/PondLolligator.ts:69–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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{

Callers 1

handlePondMethod · 0.80

Calls 2

getX2Method · 0.80
getX1Method · 0.80

Tested by

no test coverage detected