Class Game
java.lang.Object
edu.ucsb.cs156.happiercows.entities.Game
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe end date has passed whennowis at or after midnight at the end of the last date (i.e. the last date is the last day of play).booleanbooleanThe starting date is the first day of play, and the last date is the last day of play: a game is in progress from midnight (00:00 local time) at the beginning of the starting date, up to (but not including) midnight at the end of the last date.
-
Constructor Details
-
Game
public Game()
-
-
Method Details
-
gameInProgress
The starting date is the first day of play, and the last date is the last day of play: a game is in progress from midnight (00:00 local time) at the beginning of the starting date, up to (but not including) midnight at the end of the last date.- Parameters:
now- the date/time to check against- Returns:
- whether the game is in progress at
now
-
gameInProgress
public boolean gameInProgress() -
endDateHasPassed
The end date has passed whennowis at or after midnight at the end of the last date (i.e. the last date is the last day of play).- Parameters:
now- the date/time to check against- Returns:
- whether the game has ended as of
now
-