Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
All kinds of good stuff
  • Loading branch information
Joe Hill committed Apr 4, 2017
1 parent 8ce6614 commit cc8ac19
Show file tree
Hide file tree
Showing 43 changed files with 75 additions and 27 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added bin/.DS_Store
Binary file not shown.
3 changes: 0 additions & 3 deletions bin/.gitignore
@@ -1,4 +1 @@
/.DS_Store
/controller/
/model/
/view/
Binary file modified bin/controller/Cashflow.class
Binary file not shown.
Binary file added bin/model/BigDealStack.class
Binary file not shown.
Binary file added bin/model/Card.class
Binary file not shown.
Binary file added bin/model/CardStack.class
Binary file not shown.
Binary file added bin/model/CharityTile.class
Binary file not shown.
Binary file added bin/model/ChildTile.class
Binary file not shown.
Binary file added bin/model/DealCard.class
Binary file not shown.
Binary file added bin/model/DealTile.class
Binary file not shown.
Binary file added bin/model/Die.class
Binary file not shown.
Binary file added bin/model/DoodadCard.class
Binary file not shown.
Binary file added bin/model/DoodadStack.class
Binary file not shown.
Binary file added bin/model/DoodadTile.class
Binary file not shown.
Binary file added bin/model/FinancialStatement.class
Binary file not shown.
Binary file added bin/model/GameBoard.class
Binary file not shown.
Binary file added bin/model/MarketCard.class
Binary file not shown.
Binary file added bin/model/MarketStack.class
Binary file not shown.
Binary file added bin/model/MarketTile.class
Binary file not shown.
Binary file added bin/model/OwnedRealEstate.class
Binary file not shown.
Binary file added bin/model/PaydayTile.class
Binary file not shown.
Binary file added bin/model/Player.class
Binary file not shown.
Binary file added bin/model/Professions.class
Binary file not shown.
Binary file added bin/model/SmallDealStack.class
Binary file not shown.
Binary file added bin/model/Stock.class
Binary file not shown.
Binary file added bin/model/Tile.class
Binary file not shown.
Binary file added bin/model/TileCircularLinkedList$Node.class
Binary file not shown.
Binary file added bin/model/TileCircularLinkedList.class
Binary file not shown.
Binary file added bin/view/MainWindow$1.class
Binary file not shown.
Binary file added bin/view/MainWindow.class
Binary file not shown.
Binary file added bin/view/MainWindow1$1.class
Binary file not shown.
Binary file added bin/view/MainWindow1.class
Binary file not shown.
8 changes: 2 additions & 6 deletions src/controller/Cashflow.java
Expand Up @@ -20,10 +20,6 @@ public class Cashflow

}





public void go()
{
// Joe
Expand Down Expand Up @@ -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();

}

Expand Down
13 changes: 13 additions & 0 deletions src/model/CharityTile.java
Expand Up @@ -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
}

}
7 changes: 7 additions & 0 deletions src/model/ChildTile.java
Expand Up @@ -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
}

}
22 changes: 19 additions & 3 deletions src/model/DealTile.java
@@ -1,5 +1,7 @@
package model;

import java.util.Scanner;

public class DealTile extends Tile
{
private static SmallDealStack _smallDealStack;
Expand All @@ -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:
Expand All @@ -43,6 +61,4 @@ public class DealTile extends Tile

}



}
14 changes: 14 additions & 0 deletions src/model/DoodadTile.java
Expand Up @@ -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
}
}
2 changes: 2 additions & 0 deletions src/model/FinancialStatement.java
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion src/model/GameBoard.java
Expand Up @@ -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;
}
Expand Down
20 changes: 13 additions & 7 deletions src/model/Player.java
Expand Up @@ -4,20 +4,23 @@ 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;
_hasWon = false;
}


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

Expand All @@ -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;
}

Expand Down
8 changes: 2 additions & 6 deletions src/model/Professions.java
Expand Up @@ -36,19 +36,15 @@ 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,
AirlinePilot, Lawyer, PoliceOfficer, Doctor, Mechanic, Janitor};

public Profession playerProf;

public Professions()
{

}

public Professions() {}

public Profession getProfession()
{
Expand Down
2 changes: 1 addition & 1 deletion src/model/Tile.java
Expand Up @@ -24,7 +24,7 @@ public class Tile
return _name;
}

public void getLandedOn()
public void getLandedOn(Player p)
{

}
Expand Down

0 comments on commit cc8ac19

Please sign in to comment.