Android-based-rummy-game.pdf

  • Uploaded by: Farooq Azam
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Android-based-rummy-game.pdf as PDF for free.

More details

  • Words: 265
  • Pages: 12
1

Android Based Rummy Game CS 323 – OBJECT ORIENTED ANALYSIS AND DESIGN

2

Rida-e-Fatima Zainub Wahid

2012-314 2012-420

Rummy Basics



Players :

Human vs. Program



Deck

:

52 Cards



Suits

:

4 suits (Hearts, Clubs, Spades, Diamonds)



Cards

:

10 Cards per Player



Stacks :

2 Stacks (Stock and Discard Pile)

3

4

Ending and Scoring 

5

A player wins the hand by being the first to play all the cards in their hand by either melding, laying off or discarding

Card

Score

Aces

1 Point Each

Faces (K, Q & J)

10 Points Each

Other Cards

Pip Value

6

Attributes and Methods 

Player 



Attributes 

Hand hand



String Name

Methods 

Player (string playerName)



Void reset ()



String getPlayerName ()



Int getScore ()



Void incrementRoundsWon ()



Void addCard (Card aCard)



Card[] getHand ()

7

Attributes and Methods (Cont.) 

Card 



Attributes 

String Suite



Int Rank



Int Value

Methods 

Card (string Suite, int Rank)



String getSuite ()



Int getRank ()



Int getValue ()

8

Attributes and Methods (Cont.) 

Deck 

Attributes 





Card Cards

Methods 

Deck ()



Deck dealCard ()



Deck Shuffle ()

Rummy 

Attributes 



Deck deck

Methods 

Rummy ()



Void newRound ()



Void hitPlayer ()

9

Use Case

10

Use Case (Cont.) 

A move includes drawing from either stock or discard pile and then discarding a card.

11

References 1.

http://rummy.com/rummyrules.html

2.

https://www.student.cs.uwaterloo.ca/~cs132/Weekly/W05/A05/A0 5classdiagram.html

12

More Documents from "Farooq Azam"

Proposal.docx
November 2019 18
Proposal Final.docx
November 2019 11
Android-based-rummy-game.pdf
November 2019 13
Rummy-card-game.docx
November 2019 10
Cover Heg.docx
December 2019 28
Pengesah Heg.docx
December 2019 36