From c472de3eb09dd8287d2fdc9f75299f1249e9ebe2 Mon Sep 17 00:00:00 2001 From: Joe Hill Date: Fri, 24 Mar 2017 12:29:50 -0400 Subject: [PATCH] Friday again... --- bin/controller/Cashflow.class | Bin 1334 -> 1566 bytes src/controller/Cashflow.java | 24 +++++++++++++++++++++++- src/model/FinancialStatement.java | 28 ++++++++++++++++++++++++---- src/model/GameBoard.java | 4 ++++ src/model/MarketStack.java | 30 +++++++++++++++--------------- src/model/Player.java | 2 ++ src/model/Tile.java | 8 ++++++++ 7 files changed, 76 insertions(+), 20 deletions(-) diff --git a/bin/controller/Cashflow.class b/bin/controller/Cashflow.class index 37ff42fd6a419eff73e89640ccb1fd665407f971..5362349525ab62564fc8621e03054d349a9ce788 100644 GIT binary patch delta 320 zcmYjMu}%U(6rAOvoSP#m{J@rAOt7HQ1{+(0!g+!=i??`Zj@`@NNkYX(SlRdo7Q_S- zO|*wtQKnK@LK6Vxy4CfyD7%;eT7Q|XB%iuIyqbe>K zw(sOjwiBsu+b7l<>*A6j@U>N$NoFb(H)fi~iOgf8MQY7BQPU&Aw+4|CQtE8+UgCJ0nhk+4DGBOA; N2!rWBAj!lK1OOdL3&8*Y diff --git a/src/controller/Cashflow.java b/src/controller/Cashflow.java index 1d75f68..3b10d14 100644 --- a/src/controller/Cashflow.java +++ b/src/controller/Cashflow.java @@ -45,7 +45,29 @@ public class Cashflow public void play() { - + while(!isWinner()) + { + // Check down sized (check if player's downsize counter is 0) + // Check charity (Check if charity counter is 0) + // Roll dice + // Move player + // Get card from tile () + // + } + } + + public boolean isWinner() + { + for(Player p : _players) + { + if(p.hasWon()) + { + return true; + break; + } + else + return false; + } } diff --git a/src/model/FinancialStatement.java b/src/model/FinancialStatement.java index 1895073..49e8dcd 100644 --- a/src/model/FinancialStatement.java +++ b/src/model/FinancialStatement.java @@ -11,6 +11,29 @@ public class FinancialStatement private double liabilities; private double income; + public FinancialStatement(Profession p) + { + salary = p.getSalary(); + + } + + public void setChildExp(int i) // One fo these for each of the little line items that actually change + { + //childExp = i; + update(); + } + + + private void update() + { + //expenses = asdf +asdf_A+sdf+ASDf + //income = blah+ blah + //cashflow = bluh + bluh + + + } + + Profession p = new Profession("Teacher", 3300, 500, 500, 100, 100, 200, 700, 0, 0, 200, 400, 50000, 12000, 5000, 4000); @@ -39,10 +62,7 @@ public class FinancialStatement income = p.getSalary(); return income; } - public void FinancialStatement() - { - - } + public void display() { diff --git a/src/model/GameBoard.java b/src/model/GameBoard.java index fb0b7c3..0a1f4e6 100644 --- a/src/model/GameBoard.java +++ b/src/model/GameBoard.java @@ -4,5 +4,9 @@ public class GameBoard { private Tile[] _gameTiles; + + + + // This class should have an array of tiles that goes back to the beginning when it reaches the end } diff --git a/src/model/MarketStack.java b/src/model/MarketStack.java index cafb177..3156675 100644 --- a/src/model/MarketStack.java +++ b/src/model/MarketStack.java @@ -45,18 +45,18 @@ public class MarketStack extends CardStack "expense", false, 1000 ,""); //stock MarketCard - no value necessary - private static MarketCard Stock1 = new MarketCard("Stock - MYT4U Electronics Co.", - "MYT4U takes a gamble on new home entertainment tech. Will it hit big or be the next Beta-Max? MarketCardholder Rolls 1 Die. Die = 1-3, STOCK SPLITS! Everyone who owns MYT4U DOUBLES their number of shares. Die 4-6, STOCK REVERSE SPLITS! Everyone who owns MYT4U loses half their shares.", - "stock",true,0, "MYT4U"); - private static MarketCard Stock2 = new MarketCard("Stock - GRO4US Fund", - "The market is in flux and there will be monumental market swings over the next few months. How will mutual funds fair in this time of change? MarketCardholder Rolls 1 Die. Die = 1-3, STOCK SPLITS! Everyone who owns GRO4US DOUBLES their number of shares. Die 4-6, STOCK REVERSE SPLITS! Everyone who owns GRO4US loses half their shares.", - "stock",true,0, "GRO4US"); - private static MarketCard Stock3 = new MarketCard("Stock - ON2U Entertainment Co.", - "Studio backs fresh director for its summer blockbuster. Groundbreaking production could be too ambitious. MarketCardholder Rolls 1 Die. Die = 1-3, STOCK SPLITS! Everyone who owns ON2U DOUBLES their number of shares. Die 4-6, STOCK REVERSE SPLITS! Everyone who owns ON2U loses half their shares.", - "stock",true,0, "ON2U"); - private static MarketCard Stock4 = new MarketCard("Stock - OK4U Drug Co.", - "OK4U begins trial on possible life-saving drug. Side effects are untested. Could change the world... if it works. MarketCardholder Rolls 1 Die. Die = 1-3, STOCK SPLITS! Everyone who owns OK4U DOUBLES their number of shares. Die 4-6, STOCK REVERSE SPLITS! Everyone who owns OK4U loses half their shares.", - "stock",true,0,"OK4U"); + //private static MarketCard Stock1 = new MarketCard("Stock - MYT4U Electronics Co.", + // "MYT4U takes a gamble on new home entertainment tech. Will it hit big or be the next Beta-Max? MarketCardholder Rolls 1 Die. Die = 1-3, STOCK SPLITS! Everyone who owns MYT4U DOUBLES their number of shares. Die 4-6, STOCK REVERSE SPLITS! Everyone who owns MYT4U loses half their shares.", + // "stock",true,0, "MYT4U"); + //private static MarketCard Stock2 = new MarketCard("Stock - GRO4US Fund", + // "The market is in flux and there will be monumental market swings over the next few months. How will mutual funds fair in this time of change? MarketCardholder Rolls 1 Die. Die = 1-3, STOCK SPLITS! Everyone who owns GRO4US DOUBLES their number of shares. Die 4-6, STOCK REVERSE SPLITS! Everyone who owns GRO4US loses half their shares.", + // "stock",true,0, "GRO4US"); + //private static MarketCard Stock3 = new MarketCard("Stock - ON2U Entertainment Co.", + // "Studio backs fresh director for its summer blockbuster. Groundbreaking production could be too ambitious. MarketCardholder Rolls 1 Die. Die = 1-3, STOCK SPLITS! Everyone who owns ON2U DOUBLES their number of shares. Die 4-6, STOCK REVERSE SPLITS! Everyone who owns ON2U loses half their shares.", + // "stock",true,0, "ON2U"); + //private static MarketCard Stock4 = new MarketCard("Stock - OK4U Drug Co.", + // "OK4U begins trial on possible life-saving drug. Side effects are untested. Could change the world... if it works. MarketCardholder Rolls 1 Die. Die = 1-3, STOCK SPLITS! Everyone who owns OK4U DOUBLES their number of shares. Die 4-6, STOCK REVERSE SPLITS! Everyone who owns OK4U loses half their shares.", + // "stock",true,0,"OK4U"); //repercent - how much percentage selling your property would yield you (aka if it's current cost + 10%, you'd yield 110% of the original cost in the sale minus what you owe private static MarketCard REPercent1 = new MarketCard("House Buyer - 3BR/2BA", @@ -93,7 +93,7 @@ public class MarketStack extends CardStack "refixed",true,15000,"3Br2Ba"); private static MarketCard REFixed2 = new MarketCard("House Buyer - 3BR/2BA", "Buyer searching for 3Br/2Ba house. Offers your original cost plus $10,000. Everyone may sell any number of properties at this price. If you sell, pay off the related mortgage and give up the cash flow on this property.", - "refixed",true,1000,"3Br2Ba"); + "refixed",true,10000,"3Br2Ba"); private static MarketCard REFixed3 = new MarketCard("House Buyer - 3BR/2BA", "Buyer searching for 3Br/2Ba house. Offers your original cost plus $20,000. Everyone may sell any number of properties at this price. If you sell, pay off the related mortgage and give up the cash flow on this property.", "refixed",true,20000,"3Br2Ba"); @@ -145,9 +145,9 @@ public class MarketStack extends CardStack public MarketStack() { MarketCard[] marketCardArray = {Profit1, Profit2, - Gold1, Gold2, Gold3, Gold4, + //Gold1, Gold2, Gold3, Gold4, Expense1, Expense2, Expense3, Expense4, Expense5, - Stock1, Stock2, Stock3, Stock4, + //Stock1, Stock2, Stock3, Stock4, REPercent1, REPercent2, REPercent3, REPercent4, REPercent5, REPercent6, REPercent7, REPercent8, REPercent9, REFixed1, REFixed2, REFixed3, REFixed4, REFixed5, REFixed6, REFixed7, REFixed8, REFixed9, REFixed10, REFixed11, REHOffer1, REHOffer2, diff --git a/src/model/Player.java b/src/model/Player.java index 1ff34f5..6a024cd 100644 --- a/src/model/Player.java +++ b/src/model/Player.java @@ -4,4 +4,6 @@ public class Player { private FinancialStatement _fs; + + } diff --git a/src/model/Tile.java b/src/model/Tile.java index 9f4d5d9..a4b69d1 100644 --- a/src/model/Tile.java +++ b/src/model/Tile.java @@ -2,5 +2,13 @@ package model; public class Tile { + private String _type; + + public Tile(String type) + { + _type = type; + } + + }