Java Universal Role Playing Engine Version 0.3.9

jurpe.world
Class GameTime

java.lang.Object
  extended by jurpe.world.GameTime

public class GameTime
extends java.lang.Object

This class implements the time in the game


Constructor Summary
GameTime()
          Initializes a new Game Time
GameTime(int day, short hour, short minute)
          Inititializes new Game Time
 
Method Summary
 void addOneHour()
           
 void addOneMinute()
           
 java.lang.String getCurrentDate()
          Get the current date and time in the game
 java.lang.String getCurrentTime()
          Get the current time in the game
 int getDay()
           
 short getHour()
           
 short getMinute()
           
 short getSecond()
           
static void main(java.lang.String[] args)
           
 void setDay(int gtDay)
           
 void setHour(short gtHour)
           
 void setMinute(short gtMinute)
           
 void setRandomTime(java.util.Random rnd)
          Set a random hour in the game
 void setSecond(short gtSecond)
           
 java.lang.String toString()
           
 java.lang.String whatTimeIsIt()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GameTime

public GameTime()
Initializes a new Game Time


GameTime

public GameTime(int day,
                short hour,
                short minute)
Inititializes new Game Time

Parameters:
day - Day of the game
hour - Current Hour in the game
minute - Current Minute in the game
Method Detail

setRandomTime

public void setRandomTime(java.util.Random rnd)
Set a random hour in the game

Parameters:
rnd - Random seed

getCurrentDate

public java.lang.String getCurrentDate()
Get the current date and time in the game

Returns:
A string representing the current date and time in the game

getCurrentTime

public java.lang.String getCurrentTime()
Get the current time in the game

Returns:
A string representing the current time in the game

addOneMinute

public void addOneMinute()

addOneHour

public void addOneHour()

whatTimeIsIt

public java.lang.String whatTimeIsIt()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static final void main(java.lang.String[] args)

getDay

public int getDay()
Returns:
Returns the gtDay.

setDay

public void setDay(int gtDay)
Parameters:
gtDay - The gtDay to set.

getHour

public short getHour()
Returns:
Returns the gtHour.

setHour

public void setHour(short gtHour)
Parameters:
gtHour - The gtHour to set.

getMinute

public short getMinute()
Returns:
Returns the gtMinute.

setMinute

public void setMinute(short gtMinute)
Parameters:
gtMinute - The gtMinute to set.

getSecond

public short getSecond()
Returns:
Returns the gtSecond.

setSecond

public void setSecond(short gtSecond)
Parameters:
gtSecond - The gtSecond to set.

Java Universal Role Playing Engine Version 0.3.9

Copyright ? 2010 http://jurpe.sourceforge.net/ All Rights Reserved.