Permalink
Cannot retrieve contributors at this time
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?
2102-Group-Project-Spring-2017/src/model/Player.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
106 lines (84 sloc)
1.55 KB
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
package model; | |
public class Player | |
{ | |
private FinancialStatement _fs; | |
private boolean _donate; | |
private int _charityCount; //charity counter | |
private int _downsizeCount; //down size counter | |
private int _location;//refers to a tile number | |
private String _name; | |
private boolean _hasWon; | |
private String _playerName; | |
public Player(String name) | |
{ | |
Professions p = new Professions(); | |
_name = name; | |
_fs = new FinancialStatement(p.getProfession()); | |
_charityCount = 0; | |
_downsizeCount = 0; | |
_location = 0; | |
_hasWon = false; | |
} | |
public boolean hasWon() | |
{ | |
return _hasWon; | |
} | |
public FinancialStatement getFinancialStatement() | |
{ | |
return _fs; | |
} | |
public boolean donateCharity() | |
{ | |
return _donate; | |
} | |
public void setCharity(boolean charityq) | |
{ | |
_donate = charityq; | |
} | |
public void setLocation(int i) | |
{ | |
_location = i; | |
} | |
public int getLocation() | |
{ | |
return this._location; | |
} | |
public int getCharityCount() | |
{ | |
return _charityCount; | |
} | |
public void setCharityCount(int charityCount) | |
{ | |
_charityCount = charityCount; | |
} | |
public void decrementCharityCount() | |
{ | |
_charityCount--; | |
} | |
public void increaseDownsizeCount() | |
{ | |
_downsizeCount = _downsizeCount + 2; | |
} | |
public int getDownsizeCount() | |
{ | |
return _downsizeCount; | |
} | |
public void decrememntDownsizeCount() | |
{ | |
_downsizeCount--; | |
} | |
public void setPlayerName(String playerName) | |
{ | |
_playerName = playerName; | |
} | |
public String getPlayerName() | |
{ | |
return _playerName; | |
} | |
public String getName() { | |
return _name; | |
} | |
public void setName(String _name) { | |
this._name = _name; | |
} | |
} |