我目前正在做一个扑克 java 游戏练习,我遇到了这个我无法理解的丑陋错误。这一定是某种语法错误,因为编译器会抛出其中的 100 个错误。但我只是不知道错误在哪里??
import java.util.Random;
public class Poker
{
private Card[] deck;
private Card[] hand;
private int currentCard;
private int numbers[], triples, couples;
private String faces[], suits[];
private boolean flushOnHand, fourOfAKind, isStraight;
private static final int NUMBER_OF_CARDS = 52;
private static final Random randomNumbers = new Random();
Poker()
{
faces = { "Ace", "Deuce", "Three", "Four", "Five",
"Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"};
suits = { "Hearts", "Diamonds", "Clubs", "Spades" };
numbers = new int[ 13 ];
deck = new Card[ NUMBER_OF_CARDS ];
triples = 0; // right here's where the compiler starts complaining
couples = 0;
...
虽然我无法发现任何语法错误?
顺便说一句,这Card
是一个单独的类。