ループモード実装

This commit is contained in:
syuilo
2018-03-10 21:23:00 +09:00
parent e4aabf9357
commit e6d2cbe6a3
6 changed files with 59 additions and 8 deletions

View File

@ -90,7 +90,8 @@ export default Vue.extend({
if (!this.game.is_ended) return;
this.o = new Othello(this.game.settings.map, {
isLlotheo: this.game.settings.is_llotheo,
canPutEverywhere: this.game.settings.can_put_everywhere
canPutEverywhere: this.game.settings.can_put_everywhere,
loopedBoard: this.game.settings.looped_board
});
this.logs.forEach((log, i) => {
if (i < v) {
@ -104,7 +105,8 @@ export default Vue.extend({
created() {
this.o = new Othello(this.game.settings.map, {
isLlotheo: this.game.settings.is_llotheo,
canPutEverywhere: this.game.settings.can_put_everywhere
canPutEverywhere: this.game.settings.can_put_everywhere,
loopedBoard: this.game.settings.looped_board
});
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.looped_board" @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>