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

Method drawQuestLogo

code/main/TheArena.ts:21–39  ·  view source on GitHub ↗
(questFolderName: string, x: number, y: number)

Source from the content-addressed store, hash-verified

19
20 // Private methods
21 private drawQuestLogo(questFolderName: string, x: number, y: number): void{
22 // If the quest folder name given isn't null
23 if(questFolderName != null){
24 // If this quest doesn't exist
25 if(TheArenaModule.getQuest(questFolderName) == null)
26 console.log("Trying to draw the arena quest " + questFolderName + " which wasn't added to the arena module.");
27 // Else, this quest exists
28 else{
29 // Draw the logo
30 TheArenaModule.getQuest(questFolderName).drawLogo(this.renderArea, x, y, this.getGame());
31 }
32 }
33
34 // Draw the borders
35 this.renderArea.drawHorizontalLine("-", x, x + 19, y);
36 this.renderArea.drawHorizontalLine("-", x, x + 19, y + 5);
37 this.renderArea.drawVerticalLine("|", x, y, y + 5);
38 this.renderArea.drawVerticalLine("|", x + 19, y, y + 5);
39 }
40
41 private update(): void{
42 // Erase everything

Callers 1

updateMethod · 0.95

Calls 5

getQuestMethod · 0.80
drawLogoMethod · 0.80
drawHorizontalLineMethod · 0.80
drawVerticalLineMethod · 0.80
getGameMethod · 0.45

Tested by

no test coverage detected