mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-10-31 15:21:46 +09:00
✌️
This commit is contained in:
parent
c14f946bd4
commit
e05144b93e
@ -287,8 +287,15 @@ class OthelloContext extends Context {
|
||||
|
||||
public async q(query: string): Promise<string> {
|
||||
this.othello.setByNumber('black', parseInt(query, 10));
|
||||
const s = this.othello.toString() + '\n\n...(AI)...\n\n';
|
||||
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() {
|
||||
|
@ -275,4 +275,6 @@ export function ai(color: string, othello: Othello) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
think();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user