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

Method constructor

code/main/LollipopFarm.ts:43–62  ·  view source on GitHub ↗
(game: Game)

Source from the content-addressed store, hash-verified

41
42 // Constructor
43 constructor(game: Game){
44 super(game);
45
46 // Resize the area
47 this.renderArea.resizeFromArray(Database.getAscii("places/lollipopFarm/lollipopFarm"), 0, 12);
48
49 // Update
50 this.update();
51
52 // Add pond lines to the pond lines array
53 this.addPondLine(new PondLine(8, 37)); // first line, index 0 but at y position 3 on the pond
54 this.addPondLine(new PondLine(9, 38)); // second line, index 1, y position 4
55 this.addPondLine(new PondLine(9, 40)); // etc
56 this.addPondLine(new PondLine(8, 43));
57 this.addPondLine(new PondLine(8, 46));
58 this.addPondLine(new PondLine(3, 47));
59 this.addPondLine(new PondLine(4, 48));
60 this.addPondLine(new PondLine(9, 45));
61 this.addPondLine(new PondLine(12, 44));
62 }
63
64 // Public methods
65 public willBeDisplayed(): void{

Callers

nothing calls this directly

Calls 4

updateMethod · 0.95
addPondLineMethod · 0.95
resizeFromArrayMethod · 0.80
getAsciiMethod · 0.80

Tested by

no test coverage detected