Create a JApplet that plays a card game named Lucky Seven. In real life, the game can be played with seven cards, each containing a number from 1 through 7, that are shuffled and dealt number side down. To start the game, a player turns over any card. The exposed number on the card determines the position(reading from right to left) of the next card that must be turned over. For example if the player turns over the first card and its number is 7, the next card turned must be the seventh card (counting from left to right). If the player turns over a card whose number denotes a position that was already turned, the player loses the game. If the player succeeds in turning over all seven cards, the player wins.
Instead of cards, you will use seven buttons labeled 1 through 7 from left to right . Randomly associate one of the seven values 1 through with each button.(In other words, the associated value might, or might not be the equivalent to the button’s labeled value.) When the player clicks a button, reveal the associated hidden value. If the value represents the position of a button already clicked the player loses. If the revealed number represents an available number, force the user to click it - that is, do not take any action until the user clicks the correct button. After a player clicks the button remove the button from play.(After you remove a button, you can call repaint() to ensure that the image of the button is removed.)
For example a player might click Button 7, revealing a 4. Then the player clicks Button 4, revealing a 2. Than he player clicks button 2, revealing a 7. The player loses because Button 7 is already “used.”
I know you guys don't like to do whole program sbut this would be a life saver!