(savingName: string, ourSavingName: string, asciiArtName: string, pos: Pos)
| 102 | } |
| 103 | |
| 104 | private drawStone(savingName: string, ourSavingName: string, asciiArtName: string, pos: Pos): void{ |
| 105 | // If we have the stone but it isn't in the tower yet |
| 106 | if(Saving.loadBool(savingName) == true && Saving.loadBool(ourSavingName) == false){ |
| 107 | // We add the button to click on the stone |
| 108 | this.renderArea.addMultipleAsciiButtons("castleTower" + savingName + "Button", |
| 109 | pos.x + 3, pos.x + 8, pos.y, |
| 110 | pos.x + 2, pos.x + 9, pos.y + 1, |
| 111 | pos.x + 1, pos.x + 10, pos.y + 2, |
| 112 | pos.x + 2, pos.x + 9, pos.y + 3, |
| 113 | pos.x + 3, pos.x + 8, pos.y + 4); |
| 114 | // Add the link |
| 115 | this.renderArea.addLinkCall(".castleTower" + savingName + "Button", new CallbackCollection(this.clickedOnStone.bind(this, ourSavingName))); |
| 116 | } |
| 117 | // Else, if we have the stone and it is in the tower |
| 118 | else if(Saving.loadBool(savingName) == true && Saving.loadBool(ourSavingName) == true){ |
| 119 | // We draw the stone ascii art on the specified position |
| 120 | this.renderArea.drawArray(Database.getAscii(asciiArtName), pos.x, pos.y-1); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | private drawStones(): void{ |
| 125 | // Calculate the gap |
no test coverage detected