-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jackie
committed
Apr 14, 2017
1 parent
53c88af
commit ad513a2
Showing
10 changed files
with
235 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- Cashflow.java - Initialize the game! | ||
- Finish TileButton / Handler (For landing on tiles & integrating it with the model) | ||
- Finish the Tiles in Model - once again, linking them to decisions from the GUI | ||
- Finish Financial Statement & the rest of the GUI stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
/.DS_Store | ||
/controller/ | ||
/model/ | ||
/view/ |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package model; | ||
|
||
public class DownsizeTile extends Tile{ | ||
public DownsizeTile(String type, int boardIndex) | ||
{ | ||
super(type, boardIndex); | ||
|
||
} | ||
|
||
public void getLandedOn(Player p) | ||
{ | ||
p.increaseDownsizeCount(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package model; | ||
|
||
import java.awt.event.ActionEvent; | ||
import java.awt.event.ActionListener; | ||
|
||
|
||
public class Handler implements ActionListener { | ||
public int rent, price, locationOnBoard; | ||
private Tile tile; | ||
|
||
public Handler(int price, int rent, Tile tile, int locationOnBoard, | ||
GameBoard board) { | ||
this.price = price; | ||
this.rent = rent; | ||
this.tile = tile; | ||
this.locationOnBoard = locationOnBoard; | ||
|
||
} | ||
|
||
public void actionPerformed(ActionEvent event) { | ||
// refer to getLandedOn? Or one of the decision/card windows? How do i do this i am tired | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package view; | ||
|
||
import model.*; | ||
|
||
import java.awt.Graphics; | ||
import java.awt.Graphics2D; | ||
|
||
import javax.swing.JButton; | ||
|
||
public class TileButton extends JButton { | ||
|
||
private static final long serialVersionUID = 1L; | ||
private Tile tile; | ||
private int rent, price; | ||
|
||
public TileButton(String name, int TileOnBoard, GameBoard board) { | ||
super(name); | ||
|
||
tile = board.getTile(TileOnBoard); | ||
// this.setOpaque(false); | ||
this.setContentAreaFilled(false); | ||
// this.setBorderPainted(false); | ||
|
||
this.setInts(); | ||
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 cashflow | ||
* 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 } | ||
|
||
} | ||
|
||
} |