eosio-card-game-repo
eosio-card-game-repo copied to clipboard
Two issues noticed with the game's AI
-
Due to the nature of the calculate attack points function, the void card will always have the attack points 0, and will not get chosen by the AI until it is the last card left. The simple fix is just to add the line in that function: if (card1.type == VOID) result = card2.attack_points;
-
Another issue I noticed is that the player's selected card is played and set to the empty card before the AI performs its calculations. This will result in the AI making its card selection based off only the three cards that the player did not select.