Skip to content
Snippets Groups Projects
Commit 457bc208 authored by Matt Caddell's avatar Matt Caddell
Browse files

Week 2 Submission

parent 6c93a10b
No related branches found
No related tags found
No related merge requests found
Showing
with 186 additions and 172 deletions
No preview for this file type
No preview for this file type
File added
This diff is collapsed.
INFO - Creating Board
INFO - Creating Decks
INFO - Creating Bank and Player List
INFO - The Board:
INFO - --------------------------------------------------------
| | | | | | | | | | | |
| | | | | | | | | | | |
--------------------------------------------------------
| | | |
| | | |
------ ------
| | CC: 16/16 | |
| | | |
------ ------
| | | |
| | | |
------ ------
| | | |
| | | |
------ ------
| | Monopoly | |
| | By: Matt | |
------ ------
| | | |
| | | |
------ ------
| | | |
| | | |
------ ------
| | | |
| | Chance: 16/16 | |
----------- ------
| | | | |
| | | | |
--------------------------------------------------------
| | | | | | | | | | | |
| | | | | | | | | | | |
--------------------------------------------------------
INFO - 2 players to play in this game.
INFO - Player 1 named: a
INFO - Player 2 named: b
File added
Monopoly/img/DogSprite.png

201 B

Monopoly/img/HotelSprite.png

180 B

Monopoly/img/HouseSprite.png

168 B

Monopoly/img/IronSprite.png

213 B

Monopoly/img/ThimbleSprite.png

222 B

Monopoly/img/TopHatSprite.png

216 B

Monopoly/img/monopolyBoard.jpg

349 KiB

No preview for this file type
File added
File added
File added
No preview for this file type
No preview for this file type
......@@ -7,6 +7,7 @@ import Pieces.Dice;
import Players.Bank;
import Players.Player;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
......@@ -192,7 +193,7 @@ public class MonopolyBoard {
this.players = new ArrayList<>();
log.logInfo("The Board:");
System.out.println(this.toString());
log.logInfo(this.toString());
}
/**
......@@ -319,12 +320,11 @@ public class MonopolyBoard {
int next = 0;
while(!lastBidder.equals(currBidder)) {
next = (next+1)%(players.size());
System.out.println("The current bid is $"+currAmount);
System.out.print("Do you wish to bid more? (y/n): ");
String input = reader.next();
String input = JOptionPane.showInputDialog(null,"The current bid is $"+currAmount+"\nDo you wish to bid more? (y/n): ");
if(input.equals("y")) {
System.out.print("How much would you like to bid: ");
int amount = reader.nextInt();
String amountString = JOptionPane.showInputDialog("How much would you like to bid: ");
int amount = Integer.parseInt(amountString);
if(amount < currAmount)
log.logError("Incorrect bidding amount!");
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment