Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Just trying to pull..... AGAIN
  • Loading branch information
Joe Hill committed Apr 21, 2017
1 parent 45eedbe commit 2c74087
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 40 deletions.
Binary file modified bin/controller/Cashflow.class
Binary file not shown.
Binary file modified bin/model/DoodadTile.class
Binary file not shown.
Binary file modified bin/model/DownsizeTile.class
Binary file not shown.
Binary file modified bin/model/FinancialStatement.class
Binary file not shown.
Binary file modified bin/model/GameBoard.class
Binary file not shown.
Binary file modified bin/model/Tile.class
Binary file not shown.
Binary file modified bin/model/TileCircularLinkedList.class
Binary file not shown.
Binary file modified bin/view/CharityWindow$2.class
Binary file not shown.
Binary file modified bin/view/DoodadCardWindow$1.class
Binary file not shown.
Binary file removed bin/view/DoodadCardWindow$2.class
Binary file not shown.
Binary file modified bin/view/DoodadCardWindow.class
Binary file not shown.
Binary file modified bin/view/DownSizeWindow.class
Binary file not shown.
9 changes: 6 additions & 3 deletions src/controller/Cashflow.java
Expand Up @@ -69,9 +69,12 @@ public class Cashflow

private static void testGamePlay()
{
Player p = new Player();
System.out.println(p.getFinancialStatement().getProfession().getName());
GameBoard g = new GameBoard();
Player p1 = new Player();
Player p2 = new Player();
GameBoard g = new GameBoard(p1, p2);
System.out.println(p1.getLocation());
g.movePlayer(p1, 5);
System.out.println(p1.getLocation());

}

Expand Down
6 changes: 6 additions & 0 deletions src/model/DoodadTile.java
@@ -1,5 +1,7 @@
package model;

import view.*;

public class DoodadTile extends Tile
{
private static DoodadStack _doodadStack;
Expand All @@ -15,6 +17,10 @@ public class DoodadTile extends Tile
{
FinancialStatement f = p.getFinancialStatement();
DoodadCard dc = _doodadStack.pickCard();

DoodadCardWindow DoodadCardWindow = new DoodadCardWindow();
DoodadCardWindow.showButtonDemo();

int amount = dc.getValue();
if (f.getCashBalance() > amount)
{
Expand Down
8 changes: 8 additions & 0 deletions src/model/DownsizeTile.java
@@ -1,5 +1,7 @@
package model;

import view.DownSizeWindow;

public class DownsizeTile extends Tile{
public DownsizeTile(String type, int boardIndex)
{
Expand All @@ -10,5 +12,11 @@ public class DownsizeTile extends Tile{
public void getLandedOn(Player p)
{
p.increaseDownsizeCount();

DownSizeWindow DownSizeWindow = new DownSizeWindow();
DownSizeWindow.showButtonDemo();

// TODO
System.out.println("Player landed on downsized");
}
}
23 changes: 1 addition & 22 deletions src/model/FinancialStatement.java
Expand Up @@ -205,28 +205,7 @@ public class FinancialStatement
return _totalIncome;
}

public int getSalary()
{
return _salary;
}

public int getSalary()
{
return _salary;
}

public int getSalary()
{
return _salary;
}
public int getSalary()
{
return _salary;
}
public int getSalary()
{
return _salary;
}


}

Expand Down
17 changes: 9 additions & 8 deletions src/model/GameBoard.java
Expand Up @@ -41,16 +41,13 @@ public class GameBoard
{
_profs = new Professions();
_tiles = new TileCircularLinkedList();
_tiles.addTiles(t1, t2, t3, t4);
_tiles.addTiles(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24);
t1.addPlayers(players);
}
public Tile getTile(int num) {
ArrayList<Tile> tileList = new ArrayList<Tile>();
Tile[] tileList1 = {
t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24
};
tileList.addAll(Arrays.asList(tileList1));
return tileList.get(num);


public Tile getTile(int index) {
return _tiles.get(index).getData();
}

// TODO This method will move the player and returns the number of pay days they passed along the way.
Expand All @@ -70,6 +67,10 @@ public class GameBoard
{
passedPaydays++;
}

// TODO update player location on board each iteration and maybe add delay
System.out.println("Player is at tile number: " + currentNode.getData().getBoardIndex());

currentNode = nextNode;
}
currentNode.getData().addPlayers(p);
Expand Down
1 change: 1 addition & 0 deletions src/model/Stock.java
Expand Up @@ -35,4 +35,5 @@ public class Stock
return _numShares;
}


}
1 change: 1 addition & 0 deletions src/model/Tile.java
Expand Up @@ -10,6 +10,7 @@ public class Tile

public Tile(String name, int boardIndex)
{
_players = new ArrayList<Player>();
_name = name;
_boardIndex = boardIndex;
}
Expand Down
4 changes: 2 additions & 2 deletions src/model/TileCircularLinkedList.java
Expand Up @@ -64,7 +64,7 @@ public class TileCircularLinkedList
return null;
}
Node n = head;
while(index-1!=0){
while(index!=0){
n=n.next;
index--;
}
Expand All @@ -76,7 +76,7 @@ public class TileCircularLinkedList
return null;
}
Node n = head;
while(index-1!=0){
while(index!=0){
n=n.next;
index--;
}
Expand Down
4 changes: 2 additions & 2 deletions src/view/CharityWindow.java
Expand Up @@ -61,7 +61,7 @@ public class CharityWindow {
public void actionPerformed(ActionEvent e) {
//put message that they donated xx dollars after 10 seconds, close window
try {
Thread.sleep(1000);
Thread.sleep(1);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
Expand All @@ -77,7 +77,7 @@ public class CharityWindow {
DontDonate.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//put message that they are greedy. after 10 seconds, close window
System.exit(0);
System.exit(0);
}
});
controlPanel.add(Donate);
Expand Down
4 changes: 2 additions & 2 deletions src/view/DoodadCardWindow.java
Expand Up @@ -29,7 +29,7 @@ public class DoodadCardWindow {
DoodadCardWindow DoodadCardWindow = new DoodadCardWindow();
DoodadCardWindow.showButtonDemo();
}
private void prepareGUI(){
private void prepareGUI(DoodadCard dc){
mainFrame = new JFrame("Doodad");
mainFrame.getContentPane().setBackground(new Color(250, 51, 51));
mainFrame.setSize(350,250);
Expand All @@ -56,7 +56,7 @@ public class DoodadCardWindow {
mainFrame.setVisible(true);
}

private void showButtonDemo(){
public void showButtonDemo(){
headerLabel.setText("Call Doodad Title here");
statusLabel.setText("Call Doodad Description here");
//resources folder should be inside SWING folder.
Expand Down
2 changes: 1 addition & 1 deletion src/view/DownSizeWindow.java
Expand Up @@ -54,7 +54,7 @@ public class DownSizeWindow {
mainFrame.setVisible(true);
}

private void showButtonDemo(){
public void showButtonDemo(){
headerLabel.setText("Downsize");
statusLabel.setText("You lose 3 turns.");
//resources folder should be inside SWING folder.
Expand Down

0 comments on commit 2c74087

Please sign in to comment.