karenfreemansmith / Java-Cards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java Card Deck

Version 0.0.0: February 15, 2018 by Karen Freeman-Smith

Description

a set of classes that represent a deck of cards

Specifications

You should be able to “shuffle” the deck. You should also be able to draw cards from the deck one at a time until the deck is empty. Include tests.

  • Card class: properties

    • suit ( ♣️ ♦️ ♥️ ♠️ )
    • faceValue ( A 1 2 3 4 5 6 7 8 9 10 J Q K )
    • faceUp (boolean)
    • inDeck (boolean) methods
    • flip (toggles faceup)
    • toString
      • returns faceValue & suit if faceUp
      • returns XXX if not faceUp
  • Deck class: properties

    • collection of cards
      • has 52 cards total methods
    • reset
      • deck is ordered
    • shuffle
      • deck not in original order
    • draw
      • countRemaining is -1 from before draw
      • not available if countRemaining is 0
    • countRemaining
      • number of cards left in deck

Setup/Installation

  • Clone directory
  • (To run tests only: gradle test)
  • Run gradle compileJava
  • navigate to build/classes/main
  • run program by typing "java App"

Support & Contact

For questions, concerns, or suggestions please email karenfreemansmith@gmail.com

Technologies Used

Java, Gradle, junit

Legal

Copyright (c) 2018 Copyright Karen Freeman-Smith All Rights Reserved.

About


Languages

Language:Java 100.0%