Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help to implement the solitaire: Napoleon s Grave in Java. Each time the player draws a card from the deck, put it on the throw

Help to implement the solitaire: Napoleons Grave in Java.
Each time the player draws a card from the deck, put it on the throw pile.
On each turn, the player (if he or she wishes) may take a card from the throw pile or from the 4 cards at start in the open panel.
(The start point is 4 cards random shuffled face up in the panel.)
The player can choose to:
place the card in the open square if a place is free(in the middle of the 4 cards at start in the panel)
if it's a seven, put it on a beam
if it's a six, put it in the middle (if the spot is free or there's an ace there) or park it
build on a seven in beam (in ascending sequence)
build on a middle six (in descending sequence) or
leave the card on the throw pile and take the next card from the deck.
Start and stop
Please possible to restart(the deck also is shuffled) or end the game with buttons.
Help also to have the code object oriented using polymorphism. Thanks!
I have started using this from the library:
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.Collections;
import javax.swing.*;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions