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

    Constructors
    Constructor Description
    Player​(java.lang.String name, Pawn selectedPawn, float studyHours)  
  • Method Summary

    Modifier and Type Method Description
    void buySquare​(CourseSquare c)
    To be called by the UI when the player buys a Course
    java.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

      public Player​(java.lang.String name, Pawn selectedPawn, float studyHours)
      Parameters:
      name - User selected name
      selectedPawn - Pawn Object selected
      studyHours - Starting currency value set by the game options
  • Method Details

    • buySquare

      public void buySquare​(CourseSquare c)
      To be called by the UI when the player buys a Course
      Parameters:
      c - The CourseSquare 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 class java.lang.Object
    • getStudyHours

      public float getStudyHours()
    • setStudyHours

      public void setStudyHours​(float studyHours)
    • getTurnsToPlay

      public int getTurnsToPlay()
    • setTurnsToPlay

      public void setTurnsToPlay​(int turnsToPlay)
    • getPawn

      public Pawn getPawn()
    • getName

      public java.lang.String getName()
    • getCourseList

      public java.util.ArrayList<CourseSquare> getCourseList()