Question: I am writing a Spider Solitaire class in java involving the following variables and methods only(any other code needed will be written in separate classes
I am writing a Spider Solitaire class in java involving the following variables and methods only(any other code needed will be written in separate classes that will be written by somebody else)
Spider Solitaire
TableauStack: array of CardStacks objects
Stock: CardStack object
Integer runCount
moveStack(int x, int y, int z)
Moves x number of cards from column y to column z.
Void dealStock()
Deals one card to each of 8 columns of cards
Sytring printBoard()
Returns all of the cards in play
Boolean gameOver()
Checks to see if foundations are full
Void newGame()
Clears the board, shuffles the deck and calls on deal()
Boolean validMove(int x, int y, int z)
Uses getValue to compare card values in order to determine if the move is valid.
Boolean validStock()
Checks if there are empty spots in the columns
Void flipCard(int index)
Flips the bottom card of index.
Void deal()
Takes Cards from stock and adds to CardStack in the tableauStack array
I don't have a clue where to start. Please help! If you need more info please let me know.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
