Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of
https://github.uconn.edu/joh13010/2102-Group-Project-Spring-2017.git

Conflicts:
	bin/controller/Cashflow.class
	bin/model/FinancialStatement.class
	bin/view/FSWindow.class
	src/view/FSWindow.java
  • Loading branch information
Joe Hill committed Apr 23, 2017
2 parents 3ecb1a4 + 53cc8cb commit 12cc15c
Show file tree
Hide file tree
Showing 64 changed files with 361 additions and 76 deletions.
11 changes: 8 additions & 3 deletions bin/.gitignore
@@ -1,10 +1,15 @@
<<<<<<< HEAD <<<<<<< HEAD
/view/ <<<<<<< HEAD
/controller/ =======
/model/
======= =======
>>>>>>> branch 'master' of https://github.uconn.edu/joh13010/2102-Group-Project-Spring-2017.git
/.DS_Store /.DS_Store
/controller/ /controller/
/model/ /model/
<<<<<<< HEAD
>>>>>>> branch 'master' of https://github.uconn.edu/joh13010/2102-Group-Project-Spring-2017.git
/view/
/Instructions.class
=======
/view/ /view/
>>>>>>> branch 'master' of https://github.uconn.edu/joh13010/2102-Group-Project-Spring-2017.git >>>>>>> branch 'master' of https://github.uconn.edu/joh13010/2102-Group-Project-Spring-2017.git
Binary file modified bin/controller/Cashflow.class
Binary file not shown.
Binary file modified bin/model/BigDealStack.class
Binary file not shown.
Binary file modified bin/model/Card.class
Binary file not shown.
Binary file modified bin/model/CardStack.class
Binary file not shown.
Binary file modified bin/model/CharityTile.class
Binary file not shown.
Binary file modified bin/model/ChildTile.class
Binary file not shown.
Binary file modified bin/model/DealCard.class
Binary file not shown.
Binary file modified bin/model/DealTile.class
Binary file not shown.
Binary file modified bin/model/Die.class
Binary file not shown.
Binary file modified bin/model/DoodadCard.class
Binary file not shown.
Binary file modified bin/model/DoodadStack.class
Binary file not shown.
Binary file modified bin/model/DoodadTile.class
Binary file not shown.
Binary file modified bin/model/FinancialStatement.class
Binary file not shown.
Binary file removed bin/model/Handler.class
Binary file not shown.
Binary file modified bin/model/MarketCard.class
Binary file not shown.
Binary file modified bin/model/MarketStack.class
Binary file not shown.
Binary file modified bin/model/OwnedRealEstate.class
Binary file not shown.
Binary file modified bin/model/PaydayTile.class
Binary file not shown.
Binary file modified bin/model/Player.class
Binary file not shown.
Binary file modified bin/model/Profession.class
Binary file not shown.
Binary file modified bin/model/Professions.class
Binary file not shown.
Binary file modified bin/model/SmallDealStack.class
Binary file not shown.
Binary file modified bin/model/Stock.class
Binary file not shown.
Binary file modified bin/model/TileCircularLinkedList$Node.class
Binary file not shown.
Binary file modified bin/model/TileCircularLinkedList.class
Binary file not shown.
Binary file modified bin/view/CharityWindow$1.class
Binary file not shown.
Binary file modified bin/view/CharityWindow$2.class
Binary file not shown.
Binary file modified bin/view/CharityWindow$3.class
Binary file not shown.
Binary file modified bin/view/CharityWindow.class
Binary file not shown.
Binary file modified bin/view/ChildWindow$1.class
Binary file not shown.
Binary file modified bin/view/ChildWindow$2.class
Binary file not shown.
Binary file modified bin/view/ChildWindow.class
Binary file not shown.
Binary file modified bin/view/DoodadCardWindow$1.class
Binary file not shown.
Binary file added 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$1.class
Binary file not shown.
Binary file modified bin/view/DownSizeWindow.class
Binary file not shown.
Binary file modified bin/view/FSWindow.class
Binary file not shown.
Binary file modified bin/view/GameboardWindow.class
Binary file not shown.
Binary file modified bin/view/MainWindow$1.class
Binary file not shown.
Binary file modified bin/view/MainWindow.class
Binary file not shown.
Binary file modified bin/view/MainWindow1$1.class
Binary file not shown.
Binary file modified bin/view/MainWindow1.class
Binary file not shown.
Binary file modified bin/view/Positioner.class
Binary file not shown.
Binary file modified bin/view/SDStockCardWindow$1.class
Binary file not shown.
Binary file modified bin/view/SDStockCardWindow$2.class
Binary file not shown.
Binary file modified bin/view/SDStockCardWindow$3.class
Binary file not shown.
Binary file modified bin/view/SDStockCardWindow.class
Binary file not shown.
Binary file modified bin/view/TileButton.class
Binary file not shown.
Binary file modified bin/view/Window.class
Binary file not shown.
Binary file added gameboard.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 10 additions & 13 deletions src/controller/Cashflow.java
@@ -1,27 +1,24 @@
package controller; package controller;


import view.*; import view.*;

import java.util.ArrayList;

import model.*; import model.*;


public class Cashflow public class Cashflow
{ {


private GameBoard _board; private GameBoard _board;
private Player[] _players; public Player[] players;
//private CardStack[] _cards; //private CardStack[] _cards;
public GameboardWindow gameboard;
public static int numPlayers;



public static void main(String[] args)
{
/*
* Just testing stuff in here for now. Main method will call the go() method when game is built
*/
testGamePlay();

}


public void go() public static void go()
{ {
System.out.println("Start game");
// Joe // Joe
// Initialize game board // Initialize game board
// Initialize GUI // Initialize GUI
Expand Down Expand Up @@ -59,7 +56,7 @@ public class Cashflow
public boolean isWinner() public boolean isWinner()
{ {
boolean isWinner = false; boolean isWinner = false;
for(Player p : _players) for(Player p : players)
{ {
if(p.hasWon()) if(p.hasWon())
{ {
Expand Down
25 changes: 0 additions & 25 deletions src/model/Handler.java

This file was deleted.

10 changes: 10 additions & 0 deletions src/model/Instructions.java
@@ -0,0 +1,10 @@
package model;

public class Instructions
{
public static void getClicked()
{
System.out.println("You thought we were just going to GIVE you the instructions?");
System.out.println("HAHAHAHAH");
}
}
2 changes: 1 addition & 1 deletion src/model/Player.java
Expand Up @@ -6,7 +6,7 @@ public class Player
private boolean _donate; private boolean _donate;
private int _charityCount; //charity counter private int _charityCount; //charity counter
private int _downsizeCount; //down size counter private int _downsizeCount; //down size counter
private int _location; private int _location;//refers to a tile number
private boolean _hasWon; private boolean _hasWon;


public Player() public Player()
Expand Down
Binary file added src/view/.DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions src/view/DealCardWindow.java
Expand Up @@ -88,8 +88,8 @@ public class DealCardWindow {
JButton BigDeal = new JButton("BigDeal"); JButton BigDeal = new JButton("BigDeal");
JButton SmallDeal = new JButton("SmallDeal"); JButton SmallDeal = new JButton("SmallDeal");
SmallDeal.setHorizontalTextPosition(SwingConstants.LEFT); SmallDeal.setHorizontalTextPosition(SwingConstants.LEFT);
JButton AcceptDeal = new JButton("Accept Deal"); final JButton AcceptDeal = new JButton("Accept Deal");
JButton DeclineDeal = new JButton("Decline Deal"); final JButton DeclineDeal = new JButton("Decline Deal");
DeclineDeal.setHorizontalTextPosition(SwingConstants.LEFT); DeclineDeal.setHorizontalTextPosition(SwingConstants.LEFT);


BigDeal.addActionListener(new ActionListener() { BigDeal.addActionListener(new ActionListener() {
Expand Down Expand Up @@ -143,5 +143,5 @@ public class DealCardWindow {
controlPanel.add(SmallDeal); controlPanel.add(SmallDeal);
mainFrame.setVisible(true); mainFrame.setVisible(true);
return response; return response;
} }
} }
4 changes: 3 additions & 1 deletion src/view/DoodadCardWindow.java
Expand Up @@ -16,14 +16,16 @@ import javax.swing.JLabel;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;


import model.DoodadCard;

public class DoodadCardWindow { public class DoodadCardWindow {
private JFrame mainFrame; private JFrame mainFrame;
private JLabel headerLabel; private JLabel headerLabel;
private JLabel statusLabel; private JLabel statusLabel;
private JPanel controlPanel; private JPanel controlPanel;


public DoodadCardWindow(){ public DoodadCardWindow(){
prepareGUI(); prepareGUI(null);
} }
public static void main(String[] args){ public static void main(String[] args){
DoodadCardWindow DoodadCardWindow = new DoodadCardWindow(); DoodadCardWindow DoodadCardWindow = new DoodadCardWindow();
Expand Down
28 changes: 27 additions & 1 deletion src/view/FSWindow.java
Expand Up @@ -3,8 +3,9 @@ import java.awt.*;
import java.awt.Window; import java.awt.Window;
import java.awt.event.*; import java.awt.event.*;
import javax.swing.*; import javax.swing.*;
import model.*;
import controller.*; import controller.*;
import model.*;


public class FSWindow { public class FSWindow {


Expand All @@ -17,11 +18,20 @@ public class FSWindow {
public FSWindow(){ public FSWindow(){


} }
/*
public static void main(String[] args){
FSWindow FSWindow = new FSWindow();
FSWindow.prepareGUI();
FSWindow.showButtonDemo();
}*/
//private void prepareGUI()

// public static void main(String[] args){ // public static void main(String[] args){
// FSWindow FSWindow = new FSWindow(); // FSWindow FSWindow = new FSWindow();
// FSWindow.prepareGUI(); // FSWindow.prepareGUI();
// FSWindow.showButtonDemo(); // FSWindow.showButtonDemo();
// } // }

public void prepareGUI(Player p) public void prepareGUI(Player p)
{ {
FinancialStatement currentFS = p.getFinancialStatement(); FinancialStatement currentFS = p.getFinancialStatement();
Expand Down Expand Up @@ -99,14 +109,30 @@ public class FSWindow {
String[] incomeColumns = {"Description", "CashFlow"}; String[] incomeColumns = {"Description", "CashFlow"};
Object[][] income = { Object[][] income = {
{"Description", "CashFlow"}, {"Description", "CashFlow"},

//{"Salary","" currentFS.getSalary()},
{"Interest/dividends", ""/**call interest of user*/},
{"Real Estate/Business",""/**business of user*/},
{"Real Estate/Business",""/**business of user*/},
{"Real Estate/Business",""/**business of user*/},
{"Real Estate/Business",""/**business of user*/},

{"Salary",currentFS.getMonthlySalary()}, {"Salary",currentFS.getMonthlySalary()},
{"Interest/dividends", "0"}, {"Interest/dividends", "0"},


//another table for real estate //another table for real estate
<<<<<<< HEAD
{"Real Estate/Business",""/**business of user*/}, {"Real Estate/Business",""/**business of user*/},
{"Real Estate/Business",""/**business of user*/}, {"Real Estate/Business",""/**business of user*/},
{"Real Estate/Business",""/**business of user*/}, {"Real Estate/Business",""/**business of user*/},
{"Real Estate/Business",""/**business of user*/}, {"Real Estate/Business",""/**business of user*/},
=======
{"Real Estate/Business",/**business of user*/},
{"Real Estate/Business",/**business of user*/},
{"Real Estate/Business",/**business of user*/},
{"Real Estate/Business",/**business of user*/},

>>>>>>> branch 'master' of https://github.uconn.edu/joh13010/2102-Group-Project-Spring-2017.git
}; };


JTable incomeTable = new JTable(income, incomeColumns); JTable incomeTable = new JTable(income, incomeColumns);
Expand Down
25 changes: 13 additions & 12 deletions src/view/GameboardWindow.java
@@ -1,27 +1,27 @@
package view; package view;
import model.*; import model.*;
import java.awt.Dimension; import controller.*;
import java.awt.Graphics; import java.awt.*;
import java.awt.Image;

import java.awt.Point;
import java.awt.geom.Path2D;
import java.util.ArrayList; import java.util.ArrayList;


import javax.swing.ImageIcon; import javax.swing.ImageIcon;
import javax.swing.JPanel; import javax.swing.JPanel;


import controller.Cashflow;

public class GameboardWindow extends JPanel { public class GameboardWindow extends JPanel {



private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Image img = new ImageIcon(this.getClass().getResource( private Image img = new ImageIcon(this.getClass().getResource(
"gameboard.png")).getImage(); "gameboard.png")).getImage();


private GameBoard board; // private GameBoard board;
private Point[] points = new Point[24]; private Point[] points = new Point[24];


private ArrayList<Positioner> Positioners; private ArrayList<Positioner> Positioners;



public GameboardWindow(GameBoard board) { public GameboardWindow(GameBoard board) {
this.board = board; this.board = board;
Dimension size = new Dimension(img.getWidth(null), img.getHeight(null)); Dimension size = new Dimension(img.getWidth(null), img.getHeight(null));
Expand All @@ -45,6 +45,7 @@ public class GameboardWindow extends JPanel {
public void setUpTiles() { public void setUpTiles() {
// implement the tiles into the graphical boardspace // implement the tiles into the graphical boardspace
// the buttons are going to be a little off as i couldnt figure out how to rotate jbuttons // the buttons are going to be a little off as i couldnt figure out how to rotate jbuttons
// i guess it doesnt really matter what tile is which but the position matters - 0 is starting
TileButton t1 = new TileButton("Deal", 0, board); TileButton t1 = new TileButton("Deal", 0, board);
this.add(t1); this.add(t1);
t1.setBounds(125,532,95,20); //xstart,ystart,width,height t1.setBounds(125,532,95,20); //xstart,ystart,width,height
Expand Down Expand Up @@ -182,11 +183,10 @@ public class GameboardWindow extends JPanel {


} }


public void update(ArrayList<Integer> locP) { public void update() { //updates the location of the player on the board
for (int i = 0; i < locP.size(); i++) { for (int i = 0; i < Cashflow.numPlayers; i++) {
int x = (int) points[locP.get(i)].getX(); int x = (int) points[Player[i].getLocation()].getX(); // i will fix this later
int y = (int) points[locP.get(i)].getY(); int y = (int) points[Player[i].getLocation()].getY(); // hopefully lol

Positioners.get(i).setX(x); Positioners.get(i).setX(x);
Positioners.get(i).setY(y); Positioners.get(i).setY(y);


Expand All @@ -197,4 +197,5 @@ public class GameboardWindow extends JPanel {







} }

0 comments on commit 12cc15c

Please sign in to comment.