diff --git a/.DS_Store b/.DS_Store index 5f43d60..17330d1 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/bin/.DS_Store b/bin/.DS_Store new file mode 100644 index 0000000..6c20a58 Binary files /dev/null and b/bin/.DS_Store differ diff --git a/bin/.gitignore b/bin/.gitignore index 66905d0..4e7e508 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,4 +1 @@ -/.DS_Store /controller/ -/model/ -/view/ diff --git a/bin/controller/Cashflow.class b/bin/controller/Cashflow.class index 963de9a..c29e2cf 100644 Binary files a/bin/controller/Cashflow.class and b/bin/controller/Cashflow.class differ diff --git a/bin/model/BigDealStack.class b/bin/model/BigDealStack.class new file mode 100644 index 0000000..a820dd7 Binary files /dev/null and b/bin/model/BigDealStack.class differ diff --git a/bin/model/Card.class b/bin/model/Card.class new file mode 100644 index 0000000..fb749aa Binary files /dev/null and b/bin/model/Card.class differ diff --git a/bin/model/CardStack.class b/bin/model/CardStack.class new file mode 100644 index 0000000..c976fdc Binary files /dev/null and b/bin/model/CardStack.class differ diff --git a/bin/model/CharityTile.class b/bin/model/CharityTile.class new file mode 100644 index 0000000..c4acea3 Binary files /dev/null and b/bin/model/CharityTile.class differ diff --git a/bin/model/ChildTile.class b/bin/model/ChildTile.class new file mode 100644 index 0000000..e8e1174 Binary files /dev/null and b/bin/model/ChildTile.class differ diff --git a/bin/model/DealCard.class b/bin/model/DealCard.class new file mode 100644 index 0000000..adc8ef1 Binary files /dev/null and b/bin/model/DealCard.class differ diff --git a/bin/model/DealTile.class b/bin/model/DealTile.class new file mode 100644 index 0000000..1cf47b2 Binary files /dev/null and b/bin/model/DealTile.class differ diff --git a/bin/model/Die.class b/bin/model/Die.class new file mode 100644 index 0000000..3884acd Binary files /dev/null and b/bin/model/Die.class differ diff --git a/bin/model/DoodadCard.class b/bin/model/DoodadCard.class new file mode 100644 index 0000000..8e23482 Binary files /dev/null and b/bin/model/DoodadCard.class differ diff --git a/bin/model/DoodadStack.class b/bin/model/DoodadStack.class new file mode 100644 index 0000000..ddbe44a Binary files /dev/null and b/bin/model/DoodadStack.class differ diff --git a/bin/model/DoodadTile.class b/bin/model/DoodadTile.class new file mode 100644 index 0000000..916410a Binary files /dev/null and b/bin/model/DoodadTile.class differ diff --git a/bin/model/FinancialStatement.class b/bin/model/FinancialStatement.class new file mode 100644 index 0000000..ffcc689 Binary files /dev/null and b/bin/model/FinancialStatement.class differ diff --git a/bin/model/GameBoard.class b/bin/model/GameBoard.class new file mode 100644 index 0000000..7a1eefb Binary files /dev/null and b/bin/model/GameBoard.class differ diff --git a/bin/model/MarketCard.class b/bin/model/MarketCard.class new file mode 100644 index 0000000..10982d5 Binary files /dev/null and b/bin/model/MarketCard.class differ diff --git a/bin/model/MarketStack.class b/bin/model/MarketStack.class new file mode 100644 index 0000000..6c75bff Binary files /dev/null and b/bin/model/MarketStack.class differ diff --git a/bin/model/MarketTile.class b/bin/model/MarketTile.class new file mode 100644 index 0000000..8004057 Binary files /dev/null and b/bin/model/MarketTile.class differ diff --git a/bin/model/OwnedRealEstate.class b/bin/model/OwnedRealEstate.class new file mode 100644 index 0000000..b9ca4f6 Binary files /dev/null and b/bin/model/OwnedRealEstate.class differ diff --git a/bin/model/PaydayTile.class b/bin/model/PaydayTile.class new file mode 100644 index 0000000..fde1634 Binary files /dev/null and b/bin/model/PaydayTile.class differ diff --git a/bin/model/Player.class b/bin/model/Player.class new file mode 100644 index 0000000..8d9ffae Binary files /dev/null and b/bin/model/Player.class differ diff --git a/bin/model/Professions.class b/bin/model/Professions.class new file mode 100644 index 0000000..044c822 Binary files /dev/null and b/bin/model/Professions.class differ diff --git a/bin/model/SmallDealStack.class b/bin/model/SmallDealStack.class new file mode 100644 index 0000000..143fd12 Binary files /dev/null and b/bin/model/SmallDealStack.class differ diff --git a/bin/model/Stock.class b/bin/model/Stock.class new file mode 100644 index 0000000..605e025 Binary files /dev/null and b/bin/model/Stock.class differ diff --git a/bin/model/Tile.class b/bin/model/Tile.class new file mode 100644 index 0000000..b7a9114 Binary files /dev/null and b/bin/model/Tile.class differ diff --git a/bin/model/TileCircularLinkedList$Node.class b/bin/model/TileCircularLinkedList$Node.class new file mode 100644 index 0000000..64dfb0f Binary files /dev/null and b/bin/model/TileCircularLinkedList$Node.class differ diff --git a/bin/model/TileCircularLinkedList.class b/bin/model/TileCircularLinkedList.class new file mode 100644 index 0000000..2577118 Binary files /dev/null and b/bin/model/TileCircularLinkedList.class differ diff --git a/bin/view/MainWindow$1.class b/bin/view/MainWindow$1.class new file mode 100644 index 0000000..5c3d145 Binary files /dev/null and b/bin/view/MainWindow$1.class differ diff --git a/bin/view/MainWindow.class b/bin/view/MainWindow.class new file mode 100644 index 0000000..2f9e5fe Binary files /dev/null and b/bin/view/MainWindow.class differ diff --git a/bin/view/MainWindow1$1.class b/bin/view/MainWindow1$1.class new file mode 100644 index 0000000..589edb8 Binary files /dev/null and b/bin/view/MainWindow1$1.class differ diff --git a/bin/view/MainWindow1.class b/bin/view/MainWindow1.class new file mode 100644 index 0000000..077cd20 Binary files /dev/null and b/bin/view/MainWindow1.class differ diff --git a/src/controller/Cashflow.java b/src/controller/Cashflow.java index 1e95398..a0546fe 100644 --- a/src/controller/Cashflow.java +++ b/src/controller/Cashflow.java @@ -20,10 +20,6 @@ public class Cashflow } - - - - public void go() { // Joe @@ -73,8 +69,8 @@ public class Cashflow private static void testGamePlay() { Player p = new Player(); - p.getFinancialStatement().getProfession().getName(); - //GameBoard g = new GameBoard(); + System.out.println(p.getFinancialStatement().getProfession().getName()); + GameBoard g = new GameBoard(); } diff --git a/src/model/CharityTile.java b/src/model/CharityTile.java index b076885..8400994 100644 --- a/src/model/CharityTile.java +++ b/src/model/CharityTile.java @@ -8,4 +8,17 @@ public class CharityTile extends Tile super(type, boardIndex); } + + @Override + public void getLandedOn(Player p) + { + // TODO + // Ask players if they want to donate to charity (returns boolean) + // If true: + // Set players charity coutner to 3 + // Take money from them (check board for deets) + // else: + // Nothin + } + } diff --git a/src/model/ChildTile.java b/src/model/ChildTile.java index 3ffe644..434fbff 100644 --- a/src/model/ChildTile.java +++ b/src/model/ChildTile.java @@ -7,4 +7,11 @@ public class ChildTile extends Tile super(type, boardIndex); } + + @Override + public void getLandedOn(Player p) + { + // Increment child counter using addChild() method in financial statement + } + } diff --git a/src/model/DealTile.java b/src/model/DealTile.java index bb3ce60..ea1cf92 100644 --- a/src/model/DealTile.java +++ b/src/model/DealTile.java @@ -1,5 +1,7 @@ package model; +import java.util.Scanner; + public class DealTile extends Tile { private static SmallDealStack _smallDealStack; @@ -14,12 +16,28 @@ public class DealTile extends Tile } @Override - public void getLandedOn() + public void getLandedOn(Player p) { // TODO + // For now, using a scanner to interact with user until GUI is ready: // Ask user to decide big/small deal: + Scanner s = new Scanner(System.in); + System.out.println("You landed on a deal tile. Enter 0 for small deal or 1 for big deal"); + String input = s.next(); + // Pick card from big/small deal stack: + Card c; + if(input.equals("1")) + { + c = _smallDealStack.pickCard() + } + else + { + c = _smallDealStack.pickCard(); + } + // If stock, update price, then ask user if they want to buy and ask everyone if they want to sell: + if(c.getTitle().equals(anObject)) // If property, ask user if they want to do it (and check if they can afford the down payment): // If yes, call ButIncomeProperty method: // Else, do nothing: @@ -43,6 +61,4 @@ public class DealTile extends Tile } - - } diff --git a/src/model/DoodadTile.java b/src/model/DoodadTile.java index ece68a2..314d14a 100644 --- a/src/model/DoodadTile.java +++ b/src/model/DoodadTile.java @@ -2,8 +2,22 @@ package model; public class DoodadTile extends Tile { + private static DoodadStack _doodadStack; + + public DoodadTile(String name, int boardIndex) { super(name, boardIndex); + _doodadStack = new DoodadStack(); + } + + @Override + public void getLandedOn(Player p) + { + // Pop next card + // Get cash out from card + // Check if player has enough money to pay in full + // If yes: Take cash from player + // Otherwise set players cash balance to 0 } } diff --git a/src/model/FinancialStatement.java b/src/model/FinancialStatement.java index caf2de0..4a718dd 100644 --- a/src/model/FinancialStatement.java +++ b/src/model/FinancialStatement.java @@ -103,6 +103,8 @@ public class FinancialStatement _totalExpenses = _expenses; _monthlyCashFlow = _totalIncome - _totalExpenses; _hasWon = _passiveIncome > _totalExpenses; + + // TODO add method to update display if its currently being displayed } private int getPassiveIncome() diff --git a/src/model/GameBoard.java b/src/model/GameBoard.java index 0f15b49..297e530 100644 --- a/src/model/GameBoard.java +++ b/src/model/GameBoard.java @@ -46,10 +46,11 @@ public class GameBoard } currentNode.getData().addPlayers(p); p.setLocation(currentNode.getData().getBoardIndex()); + currentNode.getData().getLandedOn(p); return passedPaydays; } - public void getProfessions() + public Professions getProfessions() { return _profs; } diff --git a/src/model/Player.java b/src/model/Player.java index d8ce3c4..8fd7f8a 100644 --- a/src/model/Player.java +++ b/src/model/Player.java @@ -4,12 +4,14 @@ public class Player { private FinancialStatement _fs; private int _charityCount; //charity counter - private int _downsizeCount; //downsize counter + private int _downsizeCount; //down size counter private int _location; private boolean _hasWon; - public Player() { - + public Player() + { + Professions p = new Professions(); + _fs = new FinancialStatement(p.getProfession()); _charityCount = 0; _downsizeCount = 0; _location = 0; @@ -17,7 +19,8 @@ public class Player } - public boolean hasWon() { + public boolean hasWon() + { return _hasWon; } @@ -26,16 +29,19 @@ public class Player return _fs; } - public boolean donateCharity() { + public boolean donateCharity() + { // return false; } - public void setLocation(int i) { + public void setLocation(int i) + { _location = i; } - public int getLocation() { + public int getLocation() + { return this._location; } diff --git a/src/model/Professions.java b/src/model/Professions.java index f60eec2..a3c1cb1 100644 --- a/src/model/Professions.java +++ b/src/model/Professions.java @@ -36,7 +36,7 @@ public class Professions private static Profession Mechanic = new Profession("Mechanic", 2000, 400, 300, 0, 100, 100, 400, 0, 0, 100, 700, 31000, 0, 3000, 3000); - private static Profession Janitor = new Profession("Janitor", 1600, 300, 200, 0, 100, 100, 300, 0, 0, 100, + private static final Profession Janitor = new Profession("Janitor", 1600, 300, 200, 0, 100, 100, 300, 0, 0, 100, 600, 20000, 0, 4000, 3000); private static Profession[] profs = {Nurse, Teacher, TruckDriver, Secretary, Engineer, BusinessManager, @@ -44,11 +44,7 @@ public class Professions public Profession playerProf; - public Professions() - { - - } - + public Professions() {} public Profession getProfession() { diff --git a/src/model/Tile.java b/src/model/Tile.java index 906ad54..dac00d1 100644 --- a/src/model/Tile.java +++ b/src/model/Tile.java @@ -24,7 +24,7 @@ public class Tile return _name; } - public void getLandedOn() + public void getLandedOn(Player p) { }