I'm barely even using this anymore

This commit is contained in:
Dragon Fire
2021-01-22 21:56:26 -05:00
parent 23e55bd0ec
commit 0f99e06b92
2 changed files with 4 additions and 14 deletions
-2
View File
@@ -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/)
+4 -12
View File
@@ -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;
}
}
}