Package com.mygdx.game.Logic
Class Player
java.lang.Object
com.mygdx.game.Logic.Player
- All Implemented Interfaces:
java.io.Serializable
public class Player
extends java.lang.Object
implements java.io.Serializable
Represents the Player
- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
buySquare(CourseSquare c)
To be called by the UI when the player buys a Coursejava.util.ArrayList<CourseSquare>
getCourseList()
java.lang.String
getName()
Pawn
getPawn()
float
getStartSalary()
The ammount of money you get by passing start is different in Foititopoli.float
getStudyHours()
int
getTurnsToPlay()
void
setStudyHours(float studyHours)
void
setTurnsToPlay(int turnsToPlay)
java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Player
- Parameters:
name
- User selected nameselectedPawn
- Pawn Object selectedstudyHours
- Starting currency value set by the game options
-
-
Method Details
-
buySquare
To be called by the UI when the player buys a Course- Parameters:
c
- TheCourseSquare
being bought
-
getStartSalary
public float getStartSalary()The ammount of money you get by passing start is different in Foititopoli. This method calculates that ammount- Returns:
- The sum of salaries of each course the player has bought
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getStudyHours
public float getStudyHours() -
setStudyHours
public void setStudyHours(float studyHours) -
getTurnsToPlay
public int getTurnsToPlay() -
setTurnsToPlay
public void setTurnsToPlay(int turnsToPlay) -
getPawn
-
getName
public java.lang.String getName() -
getCourseList
-