Skip to content
Permalink
Browse files

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
Joe Hill committed Apr 23, 2017
2 parents 3ecb1a4 + 53cc8cb commit 12cc15c25579d1a1afcb6e9740159edc6d5f95c0
Showing with 361 additions and 76 deletions.
  1. +8 −3 bin/.gitignore
  2. BIN bin/controller/Cashflow.class
  3. BIN bin/model/BigDealStack.class
  4. BIN bin/model/Card.class
  5. BIN bin/model/CardStack.class
  6. BIN bin/model/CharityTile.class
  7. BIN bin/model/ChildTile.class
  8. BIN bin/model/DealCard.class
  9. BIN bin/model/DealTile.class
  10. BIN bin/model/Die.class
  11. BIN bin/model/DoodadCard.class
  12. BIN bin/model/DoodadStack.class
  13. BIN bin/model/DoodadTile.class
  14. BIN bin/model/FinancialStatement.class
  15. BIN bin/model/Handler.class
  16. BIN bin/model/MarketCard.class
  17. BIN bin/model/MarketStack.class
  18. BIN bin/model/OwnedRealEstate.class
  19. BIN bin/model/PaydayTile.class
  20. BIN bin/model/Player.class
  21. BIN bin/model/Profession.class
  22. BIN bin/model/Professions.class
  23. BIN bin/model/SmallDealStack.class
  24. BIN bin/model/Stock.class
  25. BIN bin/model/TileCircularLinkedList$Node.class
  26. BIN bin/model/TileCircularLinkedList.class
  27. BIN bin/view/CharityWindow$1.class
  28. BIN bin/view/CharityWindow$2.class
  29. BIN bin/view/CharityWindow$3.class
  30. BIN bin/view/CharityWindow.class
  31. BIN bin/view/ChildWindow$1.class
  32. BIN bin/view/ChildWindow$2.class
  33. BIN bin/view/ChildWindow.class
  34. BIN bin/view/DoodadCardWindow$1.class
  35. BIN bin/view/DoodadCardWindow$2.class
  36. BIN bin/view/DoodadCardWindow.class
  37. BIN bin/view/DownSizeWindow$1.class
  38. BIN bin/view/DownSizeWindow.class
  39. BIN bin/view/FSWindow.class
  40. BIN bin/view/GameboardWindow.class
  41. BIN bin/view/MainWindow$1.class
  42. BIN bin/view/MainWindow.class
  43. BIN bin/view/MainWindow1$1.class
  44. BIN bin/view/MainWindow1.class
  45. BIN bin/view/Positioner.class
  46. BIN bin/view/SDStockCardWindow$1.class
  47. BIN bin/view/SDStockCardWindow$2.class
  48. BIN bin/view/SDStockCardWindow$3.class
  49. BIN bin/view/SDStockCardWindow.class
  50. BIN bin/view/TileButton.class
  51. BIN bin/view/Window.class
  52. BIN gameboard.png
  53. +10 −13 src/controller/Cashflow.java
  54. +0 −25 src/model/Handler.java
  55. +10 −0 src/model/Instructions.java
  56. +1 −1 src/model/Player.java
  57. BIN src/view/.DS_Store
  58. +3 −3 src/view/DealCardWindow.java
  59. +3 −1 src/view/DoodadCardWindow.java
  60. +27 −1 src/view/FSWindow.java
  61. +13 −12 src/view/GameboardWindow.java
  62. +285 −0 src/view/MainMenu.java
  63. +1 −0 src/view/MainWindow.java
  64. +0 −17 src/view/TileButton.java
@@ -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
BIN -52 Bytes (98%) bin/controller/Cashflow.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/BigDealStack.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/Card.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/CardStack.class
Binary file not shown.
BIN -83 Bytes (91%) bin/model/CharityTile.class
Binary file not shown.
BIN +24 Bytes (100%) bin/model/ChildTile.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/DealCard.class
Binary file not shown.
BIN -291 Bytes (84%) bin/model/DealTile.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/Die.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/DoodadCard.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/DoodadStack.class
Binary file not shown.
BIN -439 Bytes (65%) bin/model/DoodadTile.class
Binary file not shown.
Binary file not shown.
BIN -741 Bytes bin/model/Handler.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/MarketCard.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/MarketStack.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/OwnedRealEstate.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/PaydayTile.class
Binary file not shown.
BIN +196 Bytes (110%) bin/model/Player.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/Profession.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/Professions.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/SmallDealStack.class
Binary file not shown.
BIN +0 Bytes (100%) bin/model/Stock.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +0 Bytes (100%) bin/view/CharityWindow$1.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/CharityWindow$2.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/CharityWindow$3.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/CharityWindow.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/ChildWindow$1.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/ChildWindow$2.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/ChildWindow.class
Binary file not shown.
BIN -230 Bytes (76%) bin/view/DoodadCardWindow$1.class
Binary file not shown.
Binary file not shown.
BIN +669 Bytes (140%) bin/view/DoodadCardWindow.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/DownSizeWindow$1.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/DownSizeWindow.class
Binary file not shown.
BIN -5.84 KB (21%) bin/view/FSWindow.class
Binary file not shown.
BIN -309 Bytes (94%) bin/view/GameboardWindow.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/MainWindow$1.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/MainWindow.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/MainWindow1$1.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/MainWindow1.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/Positioner.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +0 Bytes (100%) bin/view/SDStockCardWindow.class
Binary file not shown.
BIN -384 Bytes (68%) bin/view/TileButton.class
Binary file not shown.
BIN +0 Bytes (100%) bin/view/Window.class
Binary file not shown.
BIN +297 KB gameboard.png
Binary file not shown.
@@ -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
@@ -59,7 +56,7 @@ public void play()
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())
{ {

This file was deleted.

@@ -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");
}
}
@@ -6,7 +6,7 @@
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()
BIN +6 KB src/view/.DS_Store
Binary file not shown.
@@ -88,8 +88,8 @@ private int showButtonDemo(){
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() {
@@ -143,5 +143,5 @@ public void actionPerformed(ActionEvent e) {
controlPanel.add(SmallDeal); controlPanel.add(SmallDeal);
mainFrame.setVisible(true); mainFrame.setVisible(true);
return response; return response;
} }
} }
@@ -16,14 +16,16 @@
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();
@@ -3,8 +3,9 @@
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 {


@@ -17,11 +18,20 @@
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();
@@ -99,14 +109,30 @@ public void prepareGUI(Player p)
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);
@@ -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));
@@ -45,6 +45,7 @@ public GameboardWindow(GameBoard board) {
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
@@ -182,11 +183,10 @@ public void paintComponent(Graphics g) {


} }


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);


@@ -197,4 +197,5 @@ public void update(ArrayList<Integer> locP) {







} }

0 comments on commit 12cc15c

Please sign in to comment.
You can’t perform that action at this time.