先行後攻を決められるように

This commit is contained in:
syuilo 2018-03-10 03:24:01 +09:00
parent da99d7e6cd
commit ec176831bf

View file

@ -24,6 +24,11 @@
<div class="rules"> <div class="rules">
<mk-switch v-model="game.settings.is_llotheo" @change="onIsLlotheoChange" text="石の少ない方が勝ち(ロセオ)"/> <mk-switch v-model="game.settings.is_llotheo" @change="onIsLlotheoChange" text="石の少ない方が勝ち(ロセオ)"/>
<div>
<el-radio v-model="game.settings.bw" label="random" @change="onBwChange">ランダム</el-radio>
<el-radio v-model="game.settings.bw" :label="1" @change="onBwChange">{{ game.user1.name }}が先行</el-radio>
<el-radio v-model="game.settings.bw" :label="2" @change="onBwChange">{{ game.user2.name }}が先行</el-radio>
</div>
</div> </div>
<footer> <footer>
@ -129,6 +134,14 @@ export default Vue.extend({
settings: this.game.settings settings: this.game.settings
}); });
this.$forceUpdate(); this.$forceUpdate();
},
onBwChange(v) {
this.connection.send({
type: 'update-settings',
settings: this.game.settings
});
this.$forceUpdate();
} }
} }
}); });