どこでも置けるモード実装

This commit is contained in:
syuilo
2018-03-10 18:22:54 +09:00
parent 8b0162a458
commit c8bf30d0d8
5 changed files with 27 additions and 7 deletions

View File

@@ -89,7 +89,8 @@ export default Vue.extend({
logPos(v) {
if (!this.game.is_ended) return;
this.o = new Othello(this.game.settings.map, {
isLlotheo: this.game.settings.is_llotheo
isLlotheo: this.game.settings.is_llotheo,
canPutEverywhere: this.game.settings.can_put_everywhere
});
this.logs.forEach((log, i) => {
if (i < v) {
@@ -102,7 +103,8 @@ export default Vue.extend({
created() {
this.o = new Othello(this.game.settings.map, {
isLlotheo: this.game.settings.is_llotheo
isLlotheo: this.game.settings.is_llotheo,
canPutEverywhere: this.game.settings.can_put_everywhere
});
this.game.logs.forEach(log => {

View File

@@ -26,6 +26,7 @@
<div class="rules">
<mk-switch v-model="game.settings.is_llotheo" @change="updateSettings" text="石の少ない方が勝ち(ロセオ)"/>
<mk-switch v-model="game.settings.can_put_everywhere" @change="updateSettings" text="どこでも置けるモード"/>
<div>
<el-radio v-model="game.settings.bw" label="random" @change="updateSettings">ランダム</el-radio>
<el-radio v-model="game.settings.bw" :label="1" @change="updateSettings">{{ game.user1.name }}が黒</el-radio>