1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-25 09:44:11 +02:00

enhance(reversi): tweak reversi

This commit is contained in:
syuilo
2024-01-20 13:14:46 +09:00
parent f86d0186d2
commit b9a81edae5
16 changed files with 225 additions and 131 deletions

View File

@@ -46,7 +46,7 @@ export class Game {
constructor(map: string[], opts: Options) {
//#region binds
this.put = this.put.bind(this);
this.putStone = this.putStone.bind(this);
//#endregion
//#region Options
@@ -88,7 +88,10 @@ export class Game {
return x + (y * this.mapWidth);
}
public put(color: Color, pos: number) {
public putStone(pos: number) {
const color = this.turn;
if (color == null) return;
this.prevPos = pos;
this.prevColor = color;