Skip to content

Commit

Permalink
Remove Bots & Timer from sealed fixes arxanas#21
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-id committed May 14, 2017
1 parent 71e656f commit 07eccf6
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions public/src/components/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,29 @@ export default React.createClass({
}

let timers = ['Fast','Moderate','Slow','Leisurely'].map(x => d.option({}, x))
let startControls = d.div({},
d.div({}, `Format: ${App.state.format}`),
LBox('addBots', 'bots'),
d.div({},
d.label({},
d.input({
type: 'checkbox',
checkedLink: App.link('useTimer'),
}), ' timer: '),
d.label({},
d.select({
disabled: !App.state.useTimer,
valueLink: App.link('timerLength')
}, timers),'')),
d.div({}, startButton, readyReminderText))
let startControls = ''
if (App.state.type !== 'sealed') {
startControls = d.div({},
d.div({}, `Format: ${App.state.format}`),
LBox('addBots', 'bots'),
d.div({},
d.label({},
d.input({
type: 'checkbox',
checkedLink: App.link('useTimer'),
}), ' timer: '),
d.label({},
d.select({
disabled: !App.state.useTimer,
valueLink: App.link('timerLength')
}, timers),'')),
d.div({}, startButton, readyReminderText))
}
else {
startControls = d.div({},
d.div({}, `Format: ${App.state.format}`),
d.div({}, startButton, readyReminderText))
}

return d.fieldset({ className: 'start-controls fieldset' },
d.legend({ className: 'legend game-legend' }, 'Start game'),
Expand Down

0 comments on commit 07eccf6

Please sign in to comment.