mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 12:23:10 +02:00
✌️
This commit is contained in:
parent
c14f946bd4
commit
e05144b93e
2 changed files with 10 additions and 1 deletions
|
@ -287,8 +287,15 @@ class OthelloContext extends Context {
|
||||||
|
|
||||||
public async q(query: string): Promise<string> {
|
public async q(query: string): Promise<string> {
|
||||||
this.othello.setByNumber('black', parseInt(query, 10));
|
this.othello.setByNumber('black', parseInt(query, 10));
|
||||||
|
const s = this.othello.toString() + '\n\n...(AI)...\n\n';
|
||||||
othelloAi('white', this.othello);
|
othelloAi('white', this.othello);
|
||||||
return this.othello.toPatternString('black');
|
if (this.othello.getPattern('black').length === 0) {
|
||||||
|
this.bot.clearContext();
|
||||||
|
return '~終了~';
|
||||||
|
} else {
|
||||||
|
this.emit('updated');
|
||||||
|
return s + this.othello.toPatternString('black');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public export() {
|
public export() {
|
||||||
|
|
|
@ -275,4 +275,6 @@ export function ai(color: string, othello: Othello) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
think();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue