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

Method addRats

code/main/Cellar.ts:91–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89 }
90
91 private addRats(): void{
92 for(var i = 5; i <= 95; i++){
93 // One chance out of 3
94 if(Random.oneChanceOutOf(3)){
95 // We add a rat
96 this.addRat(new Pos(i, 2));
97 // We increase i to avoid adding a rat above the last one
98 i += 2;
99 }
100 }
101 }
102
103 private goToFifthHouse(): void{
104 this.getGame().setPlace(new FifthHouse(this.getGame()));

Callers 1

constructorMethod · 0.95

Calls 1

addRatMethod · 0.95

Tested by

no test coverage detected