Skip to content
Permalink
e8f1d7a9be
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
49 lines (34 sloc) 1016 Bytes
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 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 }
}
}