This is my current code for a card game. Edit the code in java so it can be used in an IDE software. Edit it so that the program looks something like this when played:
“HighSum GAME
================================================================================
IcePeak, You have 100 chips
--------------------------------------------------------------------------------
Game starts - Dealer shuffles deck.
--------------------------------------------------------------------------------
Dealer dealing cards - ROUND 1
--------------------------------------------------------------------------------
Dealer
<HIDDEN CARD> <Club 6>
IcePeak
<Diamond Ace> <Spade 6>
Value:7
Player call, state bet: 10
IcePeak, You are left with 90 chips
Bet on table : 20
--------------------------------------------------------------------------------
Dealer dealing cards - ROUND 2
--------------------------------------------------------------------------------
Dealer
<HIDDEN CARD> <Club 6> <Diamond 9>
IcePeak
<Diamond Ace> <Spade 6> <Heart 7>
Value:14
Dealer call, state bet: 10
Do you want to follow? [Y/N]: Y
IcePeak, You are left with 80 chips
Bet on table : 40
--------------------------------------------------------------------------------
Dealer dealing cards - ROUND 3
--------------------------------------------------------------------------------
Dealer
<HIDDEN CARD> <Club 6> <Diamond 9> <Heart Ace>
IcePeak
<Diamond Ace> <Spade 6> <Heart 7> <Spade 9>
Value:23
Page 4
Copyright SCIT, University of Wollongong, 2023
Do you want to [C]all or [Q]uit?: C
Player call, state bet: 10
You are left with 70 chips
Bet on table : 60
--------------------------------------------------------------------------------
Dealer dealing cards - ROUND 4
--------------------------------------------------------------------------------
Dealer
<HIDDEN CARD> <Club 6> <Diamond 9> <Heart Ace> <Spade 2>
IcePeak
<Diamond Ace> <Spade 6> <Heart 7> <Spade 9> <Heart King>
Value : 33
Do you want to [C]all or [Q]uit?: C
Player call, state bet: 10
You are left with 60 chips
Bet on table : 80
--------------------------------------------------------------------------------
Game End - Dealer reveal hidden cards
--------------------------------------------------------------------------------
Dealer
<Spade Ace> <Club 6> <Diamond 9> <Heart Ace> <Spade 2>
Value : 19
IcePeak
<Diamond Ace> <Spade 6> <Heart 7> <Spade 9> <Heart King>
Value : 33
IcePeak Wins
IcePeak, You have 140 chips
Dealer shuffles used cards and place behind the deck.
--------------------------------------------------------------------------------
Next Game? (Y/N) > Y”

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class HighSum {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println(“HighSum GAME”);
System.out.println(“================================================================================”);

// Login system
String username = “”;
while (true) {
System.out.print(“Enter your username: “);
username = input.nextLine();

System.out.print(“Enter your password: “);
String password = input.nextLine();

if (password.equals(“password”)) {
System.out.println(username + “, You have 100 chips”);
break;
} else {
System.out.println(“Incorrect username or password. Please try again.”);
}
}

// Set initial chips to 100
int chips = 100;

System.out.println(”--------------------------------------------------------------------------------”);
System.out.println(“Game starts - Dealer shuffles deck.”);
System.out.println(”--------------------------------------------------------------------------------”);

int roundNumber = 1;
while (true) {
// Create deck of cards
ArrayList<Card> deck = new ArrayList<Card>();
String[] suits = {“Hearts”, “Diamonds”, “Clubs”, “Spades”};
String[] ranks = {“Ace”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “Jack”, “Queen”, “King”};
for (String suit : suits) {
for (String rank : ranks) {
deck.add(new Card(suit, rank));
}
}

// Shuffle deck
Collections.shuffle(deck);

// Deal cards to players
ArrayList<Card> playerHand = new ArrayList<Card>();
ArrayList<Card> dealerHand = new ArrayList<Card>();
playerHand.add(deck.get(0));
playerHand.add(deck.get(2));
dealerHand.add(deck.get(1));
dealerHand.add(deck.get(3));

// Print players’ hands
System.out.println(“Dealer dealing cards - ROUND " + roundNumber);
System.out.println(”--------------------------------------------------------------------------------“);

System.out.println(“Dealer”);
System.out.println(”<HIDDEN CARD> " + dealerHand.get(1));

System.out.println(username);
System.out.println(playerHand.get(0) + " " + playerHand.get(1));
System.out.println("Value: " + (playerHand.get(0).getValue() + playerHand.get(1).getValue()));

// Determine highest visible card and get the bet
int bet = 0;
if (playerHand.get(1).getValue() > dealerHand.get(1).getValue()) {
System.out.print("Player call, state bet: ");
bet = input.nextInt();
} else {
System.out.println("Dealer call, state bet: “);
bet = (int) (Math.random() * (chips / 2) + 1);
System.out.println(bet);
}

// Update chips
chips -= bet;
System.out.println(username + “, You are left with " + chips + " chips”);
System.out.println(“Bet on table : " + (bet * 2));
System.out.println(”================================================================================”);

roundNumber++;
}
}
}
class Card {
private String suit;
private String rank;

public Card(String suit, String rank) {
this.suit = suit;
this.rank = rank;
}

public String getSuit() {
return suit;
}

public String getRank() {
return rank;
}

public int getValue() {
if (rank.equals(“Ace”)) {
return 14;
} else if (rank.equals(“King”)) {
return 13;
} else if (rank.equals(“Queen”)) {
return 12;
} else if (rank.equals(“Jack”)) {
return 11;
} else {
return Integer.parseInt(rank);
}
}

public String toString() {
return rank + " of " + suit;
}
}