Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of
  • Loading branch information
Joe Hill committed Mar 31, 2017
2 parents 69d148c + c4b9c3b commit 8ce6614
Show file tree
Hide file tree
Showing 11 changed files with 175 additions and 160 deletions.
Binary file modified bin/controller/Cashflow.class
Binary file not shown.
5 changes: 4 additions & 1 deletion src/controller/Cashflow.java
Expand Up @@ -72,7 +72,10 @@ public class Cashflow

private static void testGamePlay()
{
GameBoard g = new GameBoard();
Player p = new Player();
p.getFinancialStatement().getProfession().getName();
//GameBoard g = new GameBoard();

}


Expand Down
5 changes: 4 additions & 1 deletion src/model/FinancialStatement.java
Expand Up @@ -188,7 +188,10 @@ public class FinancialStatement
update();
}


public Profession getProfession()
{
return _profession;
}
}


Expand Down
17 changes: 12 additions & 5 deletions src/model/GameBoard.java
Expand Up @@ -6,19 +6,22 @@ import model.TileCircularLinkedList.Node;

public class GameBoard
{
private Professions _profs;

private TileCircularLinkedList _tiles;

private static Tile t1 = new DealTile("Deal Tile", 0);
private static Tile t2 = new DoodadTile("Doodad", 1);
private static Tile t2 = new DealTile("Doodad", 1);
private static Tile t3 = new DealTile("Deal", 2);
private static Tile t4 = new CharityTile("Charity", 3);

private static Tile t4 = new DealTile("Charity", 3);


public GameBoard()
public GameBoard(Player... players)
{
_profs = new Professions();
_tiles = new TileCircularLinkedList();
_tiles.addTiles(t1, t2, t3, t4);
t1.addPlayers(players);
}


Expand All @@ -41,10 +44,14 @@ public class GameBoard
}
currentNode = nextNode;
}
currentNode.getData().addPlayer(p);
currentNode.getData().addPlayers(p);
p.setLocation(currentNode.getData().getBoardIndex());
return passedPaydays;
}

public void getProfessions()
{
return _profs;
}

}
23 changes: 22 additions & 1 deletion src/model/MarketStack.java
Expand Up @@ -3,8 +3,15 @@ import java.util.Arrays;
import java.util.Stack;
import java.util.List;

/**
* This class contains the content written on the physical
* @author Joe
*
*/

public class MarketStack extends CardStack
{
private static final long serialVersionUID = 1L;
//Not sure how we're working in the descriptions as it's a more graphical concept but for now I'm going to type them out

/*
Expand Down Expand Up @@ -143,6 +150,7 @@ public class MarketStack extends CardStack
private static MarketCard REAOffer4 = new MarketCard("Apartment House Buyer",
"REIT offers $40,000 per unit for all units in apartment houses of 12 units or more. Buyer has capital from the sale of another apartment complex. 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.",
"aoffer",40000,"Plex");

private Stack<MarketCard> _marketCardStack;

public MarketStack()
Expand All @@ -163,14 +171,27 @@ public class MarketStack extends CardStack

_marketCardStack = MarketCardStack;
}

}













//profit MarketCard - value is how much $ is added

/*
*
*
*
*/
private static MarketCard currentcard = new MarketCard(null, null, null, 1, null);
Expand Down
4 changes: 2 additions & 2 deletions src/model/MarketTile.java
Expand Up @@ -2,8 +2,8 @@ package model;

public class MarketTile extends Tile {

public MarketTile(String type) {
super(type);
public MarketTile(String type, int boardIndex) {
super(type, boardIndex);
// TODO Auto-generated constructor stub
}

Expand Down
3 changes: 1 addition & 2 deletions src/model/OwnedRealEstate.java
Expand Up @@ -12,7 +12,7 @@ public class OwnedRealEstate
_name = name;
_price = price;
_downPayment = downPayment;
set_cashFlow(cashFlow);
_cashFlow = cashFlow;
}

public String getName() {
Expand All @@ -24,7 +24,6 @@ public class OwnedRealEstate
}

/**
*
* @return Returns a positive value for down payment!!
*/
public int getDownPayment() {
Expand Down
43 changes: 34 additions & 9 deletions src/model/Player.java
Expand Up @@ -2,22 +2,23 @@ package model;

public class Player
{
private FinancialStatement _fs; //financial statement of user
//idNumber?
// public boolean _charity;
private int _CharityCount; //charity counter
private int _DownsizeCount; //downsize counter
private FinancialStatement _fs;
private int _charityCount; //charity counter
private int _downsizeCount; //downsize counter
private int _location;
private boolean _winner = false;
private boolean _hasWon;

public Player() { //constructor
// TODO: Pick profession
public Player() {

_charityCount = 0;
_downsizeCount = 0;
_location = 0;
_hasWon = false;
}


public boolean hasWon() {
return _winner;
return _hasWon;
}

public FinancialStatement getFinancialStatement()
Expand All @@ -37,6 +38,30 @@ public class Player
public int getLocation() {
return this._location;
}


public int getCharityCount()
{
return _charityCount;
}


public void decrementCharityCount()
{
_charityCount--;
}


public int getDownsizeCount()
{
return _downsizeCount;
}


public void decrememntDownsizeCount()
{
_downsizeCount--;
}



Expand Down
33 changes: 17 additions & 16 deletions src/model/Professions.java
Expand Up @@ -4,49 +4,50 @@ import java.util.*;

public class Professions
{
Profession Nurse = new Profession("Nurse", 3100, 600, 400, 100, 100, 200, 600, 0, 0, 200, 500, 47000, 6000, 5000, 4000);
private static Profession Nurse = new Profession("Nurse", 3100, 600, 400, 100, 100, 200, 600, 0, 0, 200, 500, 47000, 6000, 5000, 4000);

Profession Teacher = new Profession("Teacher", 3300, 500, 500, 100, 100, 200, 700, 0, 0,
private static Profession Teacher = new Profession("Teacher", 3300, 500, 500, 100, 100, 200, 700, 0, 0,
200, 400, 50000, 12000, 5000, 4000);

Profession TruckDriver = new Profession("TruckDriver", 2500, 500, 400, 0, 100, 100, 600,
private static Profession TruckDriver = new Profession("TruckDriver", 2500, 500, 400, 0, 100, 100, 600,
0, 0, 200, 800, 38000, 0, 4000, 3000);

Profession Secretary = new Profession("Secretary", 2500, 500, 400, 0, 100, 100, 600, 0, 0,
private static Profession Secretary = new Profession("Secretary", 2500, 500, 400, 0, 100, 100, 600, 0, 0,
100, 700, 38000, 0, 4000, 3000);

Profession Engineer = new Profession("Engineer", 4900, 1000, 700, 100, 200, 200, 1000, 0, 0,
private static Profession Engineer = new Profession("Engineer", 4900, 1000, 700, 100, 200, 200, 1000, 0, 0,
200, 400, 75000, 12000, 7000, 5000);

Profession BusinessManager = new Profession("BusinessManager", 4600, 900, 700, 100, 100, 200,
private static Profession BusinessManager = new Profession("BusinessManager", 4600, 900, 700, 100, 100, 200,
1000, 0, 0, 300, 400, 75000, 12000, 6000, 4000);

Profession AirlinePilot = new Profession("AirlinePilot", 9500, 2000, 1000, 0, 300, 700, 2000,
private static Profession AirlinePilot = new Profession("AirlinePilot", 9500, 2000, 1000, 0, 300, 700, 2000,
0, 0, 400, 2500, 90000, 0, 15000, 22000);

Profession Lawyer = new Profession("Lawyer", 7500, 1800, 1100, 300, 200, 200, 1500, 0, 0, 400,
private static Profession Lawyer = new Profession("Lawyer", 7500, 1800, 1100, 300, 200, 200, 1500, 0, 0, 400,
2000, 115000, 78000, 11000, 7000);

Profession PoliceOfficer = new Profession("PoliceOfficer", 3000, 600, 400, 0, 100, 100, 700, 0, 0,
private static Profession PoliceOfficer = new Profession("PoliceOfficer", 3000, 600, 400, 0, 100, 100, 700, 0, 0,
200, 500, 46000, 0, 5000, 3000);

Profession Doctor = new Profession("Doctor", 13200, 3200, 1900, 700, 300, 200, 2000, 0, 0, 700,
private static Profession Doctor = new Profession("Doctor", 13200, 3200, 1900, 700, 300, 200, 2000, 0, 0, 700,
3500, 202000, 150000, 19000, 10000);

Profession Mechanic = new Profession("Mechanic", 2000, 400, 300, 0, 100, 100, 400, 0, 0, 100,
private static Profession Mechanic = new Profession("Mechanic", 2000, 400, 300, 0, 100, 100, 400, 0, 0, 100,
700, 31000, 0, 3000, 3000);

Profession Janitor = new Profession("Janitor", 1600, 300, 200, 0, 100, 100, 300, 0, 0, 100,
private static Profession Janitor = new Profession("Janitor", 1600, 300, 200, 0, 100, 100, 300, 0, 0, 100,
600, 20000, 0, 4000, 3000);


Profession[] profs = {Nurse, Teacher, TruckDriver, Secretary, Engineer, BusinessManager,
private static Profession[] profs = {Nurse, Teacher, TruckDriver, Secretary, Engineer, BusinessManager,
AirlinePilot, Lawyer, PoliceOfficer, Doctor, Mechanic, Janitor};

public Profession playerProf;

public Professions() {}

public Professions()
{

}


public Profession getProfession()
Expand Down

0 comments on commit 8ce6614

Please sign in to comment.