Skip to content
Permalink
Browse files

asdf

  • Loading branch information
Joe Hill
Joe Hill committed Apr 23, 2017
1 parent 7e4dc47 commit 32004f1db0dee979100f4954e79ad8c4ee0de780
BIN +630 Bytes (120%) bin/controller/Cashflow.class
Binary file not shown.
BIN +935 Bytes (130%) bin/model/GameBoard.class
Binary file not shown.
BIN +92 Bytes (110%) bin/model/Tile.class
Binary file not shown.
BIN +317 Bytes (110%) bin/view/GameboardWindow.class
Binary file not shown.
BIN +352 Bytes (140%) bin/view/TileButton.class
Binary file not shown.
@@ -3,23 +3,25 @@
import view.*;

import java.util.ArrayList;
import java.awt.*;
import java.swing.*;

import javax.swing.*;

import java.awt.*;
import model.*;

public class Cashflow
{
private static GameBoard _board;
public GameboardWindow gameboard;
public static ArrayList<Player> _players;
public static int numPlayers;
private JFrame frame;
private JWindow sidewindow;
private GameboardWindow window;

public static void main(String[] args)
{
go();
testGamePlay();
}

public static void go()
@@ -28,16 +30,16 @@ public static void go()
// Initialize players (pick professions)
MainMenu mm = new MainMenu();
String[] names = mm.makeMainMenu();
ArrayList<Player> players = new ArrayList<Player>();
_players = new ArrayList<Player>();
for(String name : names)
{
players.add(new Player(name));
_players.add(new Player(name));
}

// Initialize game board
_board = new GameBoard(players);
_board = new GameBoard(_players);


System.out.println("hello");
// Initialize GUI


@@ -85,9 +87,13 @@ public boolean isWinner()

private static void testGamePlay()
{
Player p1 = new Player();
Player p2 = new Player();
GameBoard g = new GameBoard(p1, p2);

Player p1 = new Player("1");
Player p2 = new Player("2");
ArrayList<Player> players = new ArrayList<Player>();
players.add(p1);
players.add(p2);
GameBoard g = new GameBoard(players);
System.out.println(p1.getLocation());
g.movePlayer(p1, 5);
System.out.println(p1.getLocation());
@@ -137,31 +143,36 @@ public static void testCards()


}
public void setUpScreen() {
frame = new JFrame("Cashflow");
frame.setLayout(new FlowLayout());
window = new GameboardWindow(_board);

sidewindow = new JWindow();
sidewindow.setLayout(new GridLayout(5, 5));

frame.add(window);


frame.pack();

frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args) {
new Cashflow(4);

}
public Cashflow(int numPlayers)
{
//this.setUpScreen(); // just did this to test the screen

}


//
// public void setUpScreen()
// {
// frame = new JFrame("Cashflow");
// frame.setLayout(new FlowLayout());
// window = new GameboardWindow(_board);
//
// sidewindow = new JWindow();
// sidewindow.setLayout(new GridLayout(5, 5));
//
// frame.add(window);
//
//
// frame.pack();
//
// frame.setVisible(true);
// frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// }
// public static void main(String[] args) {
// new Cashflow(4);
//
// }
// public Cashflow(int numPlayers)
// {
// //this.setUpScreen(); // just did this to test the screen
//
// }


}

@@ -73,7 +73,7 @@ public int movePlayer(Player p, int distance)

currentNode = nextNode;
}
currentNode.getData().addPlayers(p);
currentNode.getData().addPlayer(p);
p.setLocation(currentNode.getData().getBoardIndex());
currentNode.getData().getLandedOn(p);
return passedPaydays;
@@ -39,5 +39,10 @@ public void removePlayer(Player p)
{
_players.remove(p);
}

public void addPlayer(Player p)
{
_players.add(p);
}

}

0 comments on commit 32004f1

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