mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:26:21 +02:00
I'm barely even using this anymore
This commit is contained in:
@@ -1620,8 +1620,6 @@ here.
|
||||
* psycho-pass (Original Anime)
|
||||
- [Psycho-Pass Wiki](https://psychopass.fandom.com/wiki/Psycho-Pass_Wiki)
|
||||
* psycho-pass ([Crime Coefficient Levels Data](https://psychopass.fandom.com/wiki/Crime_Coefficient_(Index%29))
|
||||
- [PuKoren](https://github.com/PuKoren)
|
||||
* nim ([AI Code](https://github.com/PuKoren/ai-nim/blob/master/main.cpp))
|
||||
- [r/IsTodayFridayThe13th](https://www.reddit.com/r/IsTodayFridayThe13th/)
|
||||
* friday-the-13th (Concept)
|
||||
- [Random-d.uk](https://random-d.uk/)
|
||||
|
||||
@@ -11,14 +11,6 @@ module.exports = class NimCommand extends Command {
|
||||
group: 'games-mp',
|
||||
memberName: 'nim',
|
||||
description: 'Play a game of nim with another user or the AI.',
|
||||
credit: [
|
||||
{
|
||||
name: 'PuKoren',
|
||||
url: 'https://github.com/PuKoren',
|
||||
reason: 'AI Code',
|
||||
reasonURL: 'https://github.com/PuKoren/ai-nim/blob/master/main.cpp'
|
||||
}
|
||||
],
|
||||
args: [
|
||||
{
|
||||
key: 'opponent',
|
||||
@@ -97,7 +89,7 @@ module.exports = class NimCommand extends Command {
|
||||
}
|
||||
const choice = turn.first().content;
|
||||
const picked = Number.parseInt(choice, 10);
|
||||
if (choice.toLowerCase() === 'end') {
|
||||
if (choice.toLowerCase() === 'end') {
|
||||
winner = userTurn ? opponent : msg.author;
|
||||
break;
|
||||
}
|
||||
@@ -203,10 +195,10 @@ module.exports = class NimCommand extends Command {
|
||||
for (let j = 1; j <= board[i]; j++) {
|
||||
board[i] -= j;
|
||||
const sum = this.xOr(board);
|
||||
if (sum !== 0) {
|
||||
board[i] += j;
|
||||
} else {
|
||||
if (sum === 0) {
|
||||
return [i, j];
|
||||
} else {
|
||||
board[i] += j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user