can't takeback in tournament - fixes #290
This commit is contained in:
parent
8826f558e4
commit
dac03ed135
|
@ -32,11 +32,19 @@ function abortable(data) {
|
|||
}
|
||||
|
||||
function takebackable(data) {
|
||||
return playable(data) && data.takebackable && !data.tournament && playedTurns(data) > 1 && !data.player.proposingTakeback && !data.opponent.proposingTakeback;
|
||||
return playable(data) &&
|
||||
data.takebackable &&
|
||||
!data.tournament &&
|
||||
playedTurns(data) > 1 &&
|
||||
!data.player.proposingTakeback &&
|
||||
!data.opponent.proposingTakeback;
|
||||
}
|
||||
|
||||
function drawable(data) {
|
||||
return playable(data) && data.game.turns >= 2 && !data.player.offeringDraw && !data.opponent.ai;
|
||||
return playable(data) &&
|
||||
data.game.turns >= 2 &&
|
||||
!data.player.offeringDraw &&
|
||||
!data.opponent.ai;
|
||||
}
|
||||
|
||||
function resignable(data) {
|
||||
|
|
|
@ -85,7 +85,7 @@ function renderTablePlay(ctrl) {
|
|||
renderReplay(ctrl.replay),
|
||||
m('div.control.icons', [
|
||||
button.standard(ctrl, game.abortable, 'L', 'abortGame', 'abort'),
|
||||
game.takebackable ? m('button', {
|
||||
game.takebackable(ctrl.data) ? m('button', {
|
||||
class: 'button hint--bottom takeback-yes',
|
||||
'data-hint': ctrl.trans('proposeATakeback'),
|
||||
onclick: partial(ctrl.takebackYes)
|
||||
|
|
Loading…
Reference in a new issue