mirror of
https://github.com/syuilo/ai.git
synced 2024-11-24 22:01:07 +00:00
Misskey v11 対応 (#32)
This commit is contained in:
parent
6ea14ea16a
commit
37ef9094a8
|
@ -107,10 +107,10 @@ class Session {
|
||||||
});
|
});
|
||||||
|
|
||||||
// リバーシエンジン初期化
|
// リバーシエンジン初期化
|
||||||
this.o = new Reversi(this.game.settings.map, {
|
this.o = new Reversi(this.game.map, {
|
||||||
isLlotheo: this.game.settings.isLlotheo,
|
isLlotheo: this.game.isLlotheo,
|
||||||
canPutEverywhere: this.game.settings.canPutEverywhere,
|
canPutEverywhere: this.game.canPutEverywhere,
|
||||||
loopedBoard: this.game.settings.loopedBoard
|
loopedBoard: this.game.loopedBoard
|
||||||
});
|
});
|
||||||
|
|
||||||
//#region 各マスの価値を計算しておく
|
//#region 各マスの価値を計算しておく
|
||||||
|
@ -280,7 +280,7 @@ class Session {
|
||||||
});
|
});
|
||||||
|
|
||||||
// ロセオならスコアを反転
|
// ロセオならスコアを反転
|
||||||
if (this.game.settings.isLlotheo) score = -score;
|
if (this.game.isLlotheo) score = -score;
|
||||||
|
|
||||||
// 接待ならスコアを反転
|
// 接待ならスコアを反転
|
||||||
if (this.isSettai) score = -score;
|
if (this.isSettai) score = -score;
|
||||||
|
@ -333,7 +333,7 @@ class Session {
|
||||||
|
|
||||||
let score;
|
let score;
|
||||||
|
|
||||||
if (this.game.settings.isLlotheo) {
|
if (this.game.isLlotheo) {
|
||||||
// 勝ちは勝ちでも、より自分の石を少なくした方が美しい勝ちだと判定する
|
// 勝ちは勝ちでも、より自分の石を少なくした方が美しい勝ちだと判定する
|
||||||
score = this.o.winner ? base - (this.o.blackCount * 100) : base - (this.o.whiteCount * 100);
|
score = this.o.winner ? base - (this.o.blackCount * 100) : base - (this.o.whiteCount * 100);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue