WROracer / UNO-Engine

Undocumented method found JAVA-D1001
Documentation
Minor
a year agoa year old
Consider adding a doc comment for currentCard
 91        discard.add(card);
 92    }
 93
 94    public Card currentCard() { 95        if (discard.isEmpty()) { 96            return null; 97        } 98        return discard.peek(); 99    }100
101    public Queue<Card> getDraw() {
102        return draw;
Consider adding a doc comment for addCards
 67
 68    }
 69
 70    private void addCards(int start, int end, Card.Color color) { 71        for (int i = start; i <= end; i++) { 72            draw.add(new Card(color, i)); 73        } 74    } 75
 76    private void shuffle() {
 77        while (discard.size() > 1) {
Consider adding a doc comment for shuffle
 73        }
 74    }
 75
 76    private void shuffle() { 77        while (discard.size() > 1) { 78            int index = (int) (Math.random() * discard.size()); 79            draw.add(discard.remove(index)); 80        } 81    } 82
 83    public Card drawCard() {
 84        if (draw.size() == 0) {
Consider adding a doc comment for drawCard
 80        }
 81    }
 82
 83    public Card drawCard() { 84        if (draw.size() == 0) { 85            shuffle(); 86        } 87        return draw.poll(); 88    } 89
 90    public void discard(Card card) {
 91        discard.add(card);
Consider adding a doc comment for discard
 87        return draw.poll();
 88    }
 89
 90    public void discard(Card card) { 91        discard.add(card); 92    } 93
 94    public Card currentCard() {
 95        if (discard.isEmpty()) {