mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Don't need to block blue and purple anymore
This commit is contained in:
@@ -66,11 +66,7 @@ module.exports = class ConnectFourCommand extends Command {
|
||||
const playerOneEmoji = color;
|
||||
let playerTwoEmoji = color === colors.yellow ? colors.red : colors.yellow;
|
||||
try {
|
||||
const available = Object.keys(colors).filter(clr => {
|
||||
if (color === colors.blue && clr === colors.purple) return false;
|
||||
if (color === colors.purple && clr === colors.blue) return false;
|
||||
return color !== clr;
|
||||
});
|
||||
const available = Object.keys(colors).filter(clr => color !== clr);
|
||||
if (opponent.bot) {
|
||||
playerTwoEmoji = colors[available[Math.floor(Math.random() * available.length)]];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user