Skip to content

Commit eb2a7c4

Browse files
authored
Merge pull request #269 from chengjackjelly/fix-campfire
Fix the unlimited option in campfire
2 parents 1545781 + f8444a7 commit eb2a7c4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/ui/components/campfire.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {pick} from '../../utils.js'
22
import {html, Component} from '../lib.js'
33
import CardChooser from './card-chooser.js'
4+
import {isCurrRoomCompleted} from '../../game/utils-state.js'
45

56
export default class CampfireRoom extends Component {
67
rest() {
@@ -23,6 +24,17 @@ export default class CampfireRoom extends Component {
2324
const {gameState} = props
2425
const {choice, isChoosingCard} = state
2526
let label = ''
27+
if (isCurrRoomCompleted(gameState)){
28+
return html`
29+
<div class="Container Container--center">
30+
<h1 center>You've already made a choice</h1>
31+
<p center>
32+
<button onClick=${props.onContinue}>Continue to the next room</button>
33+
</p>
34+
</div>
35+
`;
36+
}
37+
2638
if (choice === 'upgradeCard') label = 'Choose a card to upgrade'
2739
if (choice === 'removeCard') label = 'Choose a card to remove'
2840
return html`

0 commit comments

Comments
 (0)