You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Saša Kocić 5b0b75045a
CardGame -> Game
6 years ago
.idea code inspection 6 years ago
src CardGame -> Game 6 years ago
.gitignore init 6 years ago
CardGame.iml init 6 years ago
README.md CardGame -> Game 6 years ago

README.md

Card Game

Game o-- Pile
class Game {
    int numberOfPlayers;
    public Player[] players;
    Pile pot;
    Pile draws;
    
    public Game(int numberOfCards, int numberOfPlayers)
    private void createPlayersWithCards(int numberOfPlayers, Pile deck)
    public void play()
}

Player o-- Pile


class Player {
    String name;
    Pile drawPile;
    Pile discardPile;
    
    Player(String name, Pile drawPile)
    public Card draw()
    public int cardsCount()
}

ArrayList *-- Card

class ArrayList< Card > {
  public boolean isEmpty()
  public int size()
  public boolean add(Card card)
  public boolean addAll(Collection<Card> card)  
}

enum Suit {
  CLUBS,
  SPADES,
  HEARTS,
  DIAMONDS
}
Card o-- Suit

class Pile extends ArrayList {
  public static Pile createDeck(int numberOfCards)
  public Pile getCardsForPlayer(int number)
  public void shuffle(Random random)
  public boolean uniqueMaximum(Card max, int maxIndex)
}

class Card {
    int number;
    Suit suit;
    
    public Card(int number, Suit suit)
}