This commit is contained in:
Dragon Fire
2020-04-09 18:28:35 -04:00
parent ca037bbbc0
commit 82ebddf985
+3 -1
View File
@@ -113,7 +113,9 @@ module.exports = class DotsAndBoxesCommand extends Command {
userTurn = !userTurn;
}
}
winner = userOwned === oppoOwned ? null : userOwned > oppoOwned ? msg.author : opponent;
winner = userOwned.length === oppoOwned.length
? null
: userOwned.length > oppoOwned.length ? msg.author : opponent;
this.client.games.delete(msg.channel.id);
return msg.say(winner ? `Congrats, ${winner}!` : 'Looks like it\'s a draw...');
} catch (err) {