From cbb5006b90d9e34b907e9a07601e96816ef9c515 Mon Sep 17 00:00:00 2001 From: Nero Ignis Date: Sun, 18 Apr 2021 12:30:05 +0200 Subject: [PATCH] WIP --- index.html | 3 +++ js/app.js | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/index.html b/index.html index c955a04..0f98cd5 100644 --- a/index.html +++ b/index.html @@ -87,6 +87,9 @@
Redeem reward ({{ currentQuest.reward }} ) +
+ +
diff --git a/js/app.js b/js/app.js index 27a0b2c..c959d97 100644 --- a/js/app.js +++ b/js/app.js @@ -295,6 +295,16 @@ let game = new Vue({ this.bricks >= this.currentQuest.bricks && this.corn >= this.currentQuest.corn ); + }, + + redeemQuest() { + if (this.isQuestRedeemable()) { + this.money += this.currentQuest.reward; + this.generateQuest(); + } else { + return false; + } + } }, });