Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
main menu
  • Loading branch information
afortuna2016 committed Apr 22, 2017
1 parent 4795507 commit 162cbc3
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 55 deletions.
7 changes: 7 additions & 0 deletions bin/.gitignore
@@ -1 +1,8 @@
<<<<<<< HEAD
=======
/.DS_Store
/controller/
/model/
>>>>>>> branch 'master' of https://github.uconn.edu/joh13010/2102-Group-Project-Spring-2017.git
/view/ /view/
/Instructions.class
Binary file modified bin/controller/Cashflow.class
Binary file not shown.
Binary file modified bin/model/CardStack.class
Binary file not shown.
Binary file removed bin/model/Handler.class
Binary file not shown.
Binary file modified bin/view/TileButton.class
Binary file not shown.
11 changes: 2 additions & 9 deletions src/controller/Cashflow.java
Expand Up @@ -11,17 +11,10 @@ public class Cashflow
private Player[] _players; private Player[] _players;
//private CardStack[] _cards; //private CardStack[] _cards;


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
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");
}
}
40 changes: 36 additions & 4 deletions src/view/MainMenu.java
@@ -1,8 +1,15 @@
package view; package view;


import javax.imageio.ImageIO; import javax.imageio.ImageIO;

import javax.swing.*; import javax.swing.*;

import controller.Cashflow;
import model.Instructions;

import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
Expand All @@ -11,7 +18,7 @@ public class MainMenu
{ {
public static void main (String[] args) public static void main (String[] args)
{ {
JFrame frame = new JFrame("CashFlow"); final JFrame frame = new JFrame("CashFlow");


frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(650,530); frame.setSize(650,530);
Expand Down Expand Up @@ -96,7 +103,32 @@ public class MainMenu
frame.add(panel3); frame.add(panel3);
frame.add(panel4); frame.add(panel4);
frame.add(panel5); frame.add(panel5);
frame.setVisible(true); frame.setVisible(true);


} newGame.addActionListener(new ActionListener() {
} public void actionPerformed(ActionEvent e) {
frame.dispose();
Cashflow.go();
}
});

rules.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
frame.dispose();
Instructions.getClicked();
}
});

exit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});







}}
17 changes: 0 additions & 17 deletions src/view/TileButton.java
Expand Up @@ -11,7 +11,6 @@ public class TileButton extends JButton {


private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Tile tile; private Tile tile;
private int rent, price;


public TileButton(String name, int TileOnBoard, GameBoard board) { public TileButton(String name, int TileOnBoard, GameBoard board) {
super(name); super(name);
Expand All @@ -20,27 +19,11 @@ public class TileButton extends JButton {
// this.setOpaque(false); // this.setOpaque(false);
this.setContentAreaFilled(false); this.setContentAreaFilled(false);
// this.setBorderPainted(false); // this.setBorderPainted(false);

this.setInts();
this.setVisible(true); this.setVisible(true);
Handler hand = new Handler(price, rent, tile, TileOnBoard,
board);
this.addActionListener(hand);


} }


public void setInts() {

if (this.tile instanceof Tile) {
/*
* i dont actually really like this method
* but i think it should be like that iterator in cash flow
* that determines moving over the tiles and if it's landed on
* the gui should be brought up already in the handler method
*/
}


}


public void paint(Graphics g) { // Do nothing here } public void paint(Graphics g) { // Do nothing here }


Expand Down

0 comments on commit 162cbc3

Please sign in to comment.