Question: Java in bluej Lab 3: Mind Reading Card Game In this laboratory exercise, you will write code to simulate a rock paper scissors card game


Java in bluej
Lab 3: Mind Reading Card Game In this laboratory exercise, you will write code to simulate a rock paper scissors card game with a twist). Instead of RPS, you will be using Attacks, Blocks, and Throws. Attack beats Throw Block beats Attack Throw beats Block Nothing happens in case of tie (or both players get the effect applied as extra credit). Both players start with 10 lives. Both players start with a deck of cards they draw from. They each start with three cards in hand. They draw a card at the start of each turn. (They have no max hand size.) Each player plays a card each turn from their own respective deck. That card is discarded and will not be used again. (It makes sense to keep track of all of the discarded cards). Resolve effects. Repeat until game ends. If out of cards in deck, don't draw and play out cards in hand. If no valid plays from either player most life wins. Card Specifics Throw Win = 1 Damage, Beats Blocks Special Throws: 3 of Each If lands opponent cannot play a block next turn, draw a card and + 1 damage. If lands opponent cannot play an attack next turn and + 2 life. If lands opponent cannot play a throw next turn and look at their hand. -If opponent has zero legal plays. Opponent plays no card and automatically loses the next exchange. Attack Win = 1 Damage, Beats Throws Special Attacks: 3 of Each If Attack Lands + 1 Damage and draw a card. If Attack Lands + 2 Damage. In all cases, discard your hand. If Attack Lands, + 1 damage for every 2 cards in hand discarded this way, rounded down. Block Block = Keep Card, Beats Attacks Special Blocks: 3 of Each. If attack blocked + 2 life. If attack blocked opponent discards a card at random. If attack blocked put the blocked card into your hand. Code Specifics I will look for the following: Super Card o Sub specific card type Sub sub specific card type . Creatively name cards Override toString() . All cards are playable. Interface Playable Abstract playCard() It might have a parameter based on how you design this game. Make a Player class. See if you can reuse the player class for the computer rather than make a computer class. Global variables, constructors, getters, and setters as needed. Make an array of cards to serve as decks. When you draw, pick a random card within the array, add to hand array, and remove from deck array. Some sort of Game class to organize the rules, players of the game, and hold cards. . Comments! A run(). Nearly no code in your main method. It should do nothing more than construct an instance of your game and call the run(). The use of instanceOf to compare classes. Scanner for user input. Be able to get details from your cards. Make an Al. (Extra credit, 2 players. Make sure core game works first.) A screenshot of your win. . As always extra credit provided on a case by case bases, document on separate attachment. Lab 3: Mind Reading Card Game In this laboratory exercise, you will write code to simulate a rock paper scissors card game with a twist). Instead of RPS, you will be using Attacks, Blocks, and Throws. Attack beats Throw Block beats Attack Throw beats Block Nothing happens in case of tie (or both players get the effect applied as extra credit). Both players start with 10 lives. Both players start with a deck of cards they draw from. They each start with three cards in hand. They draw a card at the start of each turn. (They have no max hand size.) Each player plays a card each turn from their own respective deck. That card is discarded and will not be used again. (It makes sense to keep track of all of the discarded cards). Resolve effects. Repeat until game ends. If out of cards in deck, don't draw and play out cards in hand. If no valid plays from either player most life wins. Card Specifics Throw Win = 1 Damage, Beats Blocks Special Throws: 3 of Each If lands opponent cannot play a block next turn, draw a card and + 1 damage. If lands opponent cannot play an attack next turn and + 2 life. If lands opponent cannot play a throw next turn and look at their hand. -If opponent has zero legal plays. Opponent plays no card and automatically loses the next exchange. Attack Win = 1 Damage, Beats Throws Special Attacks: 3 of Each If Attack Lands + 1 Damage and draw a card. If Attack Lands + 2 Damage. In all cases, discard your hand. If Attack Lands, + 1 damage for every 2 cards in hand discarded this way, rounded down. Block Block = Keep Card, Beats Attacks Special Blocks: 3 of Each. If attack blocked + 2 life. If attack blocked opponent discards a card at random. If attack blocked put the blocked card into your hand. Code Specifics I will look for the following: Super Card o Sub specific card type Sub sub specific card type . Creatively name cards Override toString() . All cards are playable. Interface Playable Abstract playCard() It might have a parameter based on how you design this game. Make a Player class. See if you can reuse the player class for the computer rather than make a computer class. Global variables, constructors, getters, and setters as needed. Make an array of cards to serve as decks. When you draw, pick a random card within the array, add to hand array, and remove from deck array. Some sort of Game class to organize the rules, players of the game, and hold cards. . Comments! A run(). Nearly no code in your main method. It should do nothing more than construct an instance of your game and call the run(). The use of instanceOf to compare classes. Scanner for user input. Be able to get details from your cards. Make an Al. (Extra credit, 2 players. Make sure core game works first.) A screenshot of your win. . As always extra credit provided on a case by case bases, document on separate attachment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
