From 0ed62aba11f49744b8b8a38c66e47b15d8ae2164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sas=CC=8Ca=20Kocic=CC=81?= Date: Sat, 20 Jun 2020 17:27:56 +0200 Subject: [PATCH] UML --- README.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2bf5678..f2a6f52 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,25 @@ # Card Game ```plantuml -Game o-- Pile +Game o-- Players class Game { - int numberOfPlayers; - public Player[] players; - Pile pot; - Pile draws; + Players players + private Pile deck public Game(int numberOfCards, int numberOfPlayers) - private void createPlayersWithCards(int numberOfPlayers, Pile deck) - public void play() } Player o-- Pile +class Players> { + Pile pot; + Pile draws; + public void play() + private int playersLeft() + private void givePotOnWin() +} + +Players *-- Player class Player { String name; @@ -45,9 +50,11 @@ Card o-- Suit class Pile extends ArrayList { public static Pile createDeck(int numberOfCards) - public Pile getCardsForPlayer(int number) + public Pile take(int number) public void shuffle(Random random) - public boolean uniqueMaximum(Card max, int maxIndex) + public void shuffle() + public boolean occurrences(int max) + public Card getMax() } class Card {