input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void set stop for games int stop for games this stop for games stop for games
|
set stop level for this user
|
public player get player int row return player stats row get player
|
returns the player of a row passed by
|
public int get stop for games return this stop for games
|
returns stop level of this user
|
public scheduler helper get scheduler helper return new scheduler helper calendar start day clone
|
return a new scheduler helper which starts at day no 1
|
public scheduler helper get scheduler helper by today return new scheduler helper calendar today clone
|
return a new scheduler helper which starts today
|
public void add interested league element league element league element if this interested league elements index of league element 1 this interested league elements add league element
|
add league element user is interested in
|
public scheduler helper get scheduler helper by day calendar day return new scheduler helper calendar day clone
|
return a new scheduler helper
|
public player get player int row return player attributes row get player
|
returns the player of a row passed by
|
public void remove interested league element league element league element interested league elements remove league element
|
remove league element user isnt interested in any more
|
public league element get league element return league element
|
returns league element of this game day
|
public vector get events from calendar day vector result new vector java util collections sort events for int i 0 i events size i scheduler event tmp scheduler event events get i if tmp get day equals day result add tmp return result
|
returns all events of a day
|
public boolean is interested in league element league element league element return interested league elements index of league element 0
|
returns true if user is interested in league element passed by
|
public void add match match match matches add match
|
adds match to this gameday
|
public boolean is interested in league elements vector league elements for int i 0 i league elements size i if is interested in league element league element league elements get i return true return false
|
returns true if user is interested in one of the passed league elements
|
public vector get events today return get events from today
|
returns all events from today
|
public date get landing date return landing date
|
gets the landing date attribute of the flight object
|
public boolean needs online return get interested users size 0
|
returns if online is needed by userinterests
|
public vector get matches return matches
|
returns the matches of this gameday
|
public vector get interested league elements return interested league elements
|
returns all league elements user is interested in
|
public calendar get today return calendar today clone
|
return day no of today
|
public int get event type return event type public
|
overrides the get event type method because event is public
|
public vector get matches vector result new vector for int i 0 i scheduler game day events size i scheduler event game day matches tmp scheduler event game day matches scheduler game day events get i vector matches tmp get matches for int n 0 n matches size n result add matches get n return result
|
returns all matches of all game days
|
public string to string return this user name team this team to string
|
description of the method
|
public scheduler event game day matches get scheduler game day event user user for int i 0 i scheduler game day events size i scheduler event game day matches tmp scheduler event game day matches scheduler game day events get i if tmp is user involved user return tmp return null
|
returns game day event for a single user
|
public void end season start day add calendar year 1 today calendar start day clone remove events before today
|
resets the calendar for a new season
|
public boolean is user involved user user return get match user null
|
returns boolean if user is involved
|
public vector get league elements vector result new vector for int i 0 i scheduler game day events size i scheduler event game day matches tmp scheduler event game day matches scheduler game day events get i result add tmp get league element return result
|
returns all league elements
|
public boolean is team involved team team return get match team null
|
returns boolean if team is involved
|
private void remove events before today java util collections sort events look for events to delete vector to delete new vector for int i 0 i events size i scheduler event tmp scheduler event events get i if tmp get day before get today to delete add tmp and delete them for int i 0 i to delete size i events remove to delete get i
|
removes all events before today
|
public int get event type return event type internal
|
gets the event type of this event
|
public void play super play
|
plays the event
|
public match get match user user for int i 0 i matches size i match tmp match matches get i if tmp is user involved user return tmp return null
|
returns match of a single user
|
public calendar get day return day
|
returns date of event
|
public calendar get first day return calendar start day clone
|
returns the first day of the season
|
public boolean needs online return true
|
displays the gui
|
public string get formated date simple date format df new simple date format dd mm yyyy return df format day get time
|
returns formated date
|
public match get match team team for int i 0 i matches size i match tmp match matches get i if tmp get team home equals team tmp get team away equals team return tmp return null
|
returns match of a team
|
public calendar get last day calendar tmp calendar start day clone tmp add calendar year 1 tmp add calendar date 1 return tmp
|
returns the last day of the season
|
public void set landing date date landing date this landing date landing date
|
sets the landing date attribute of the flight object
|
public void set to done this is done true
|
set event as played
|
public scheduler event get next event sort events java util collections sort events int day nr 1 for int i 0 i events size i scheduler event tmp scheduler event events get i if tmp is done today tmp get day return tmp return null
|
returns the next not processed event
|
public void play this is done true implement
|
play method called by game thread
|
public void play super play check if matches have to be shown on the gui else play them here and place a short message if needs online for int i 0 i matches size i match tmp match matches get i tmp play
|
plays the event and all matches if online is not needed
|
public vector get events by source object source vector result new vector first add all events for the source directly for int i 0 i events size i scheduler event tmp scheduler event events get i if tmp get source equals source tmp get event type scheduler event event type public result add tmp return result
|
returns all events by source
|
public boolean needs online return false
|
returns boolean if event needs gui break
|
public calendar get sort value return day
|
returns sort value date of the event
|
public int compare to object o scheduler event tmp scheduler event o if tmp get sort value after get sort value return 1 if tmp get sort value before get sort value return 1 return 0
|
implements the comparable interface
|
public void play super play team teams game controller get scenario get teams for int i 0 i teams length i teams i get accounting account for
|
plays the event and does all the bookings
|
private void ihm init this show
|
ihm init switch frame visible display frame control
|
public player get assist1 return assist1
|
gets the assist1 attribute of the goal object
|
public player get assist2 return assist2
|
gets the assist2 attribute of the goal object
|
public boolean is user involved user user if team home equals user get team return true else if team away equals user get team return true return false
|
returns boolean if user passed by is involved in this match
|
public team get team against return team against
|
gets the team against attribute of the goal object
|
public boolean is team home winner return score sheet is home team winner
|
returns if team home is winner of this match
|
public boolean is game tied return goals home goals away
|
is game tied
|
public boolean is team winner team team team winner null if is team home winner winner team home else winner team away if team equals winner return true else return false
|
gets the team winner attribute of the match object
|
public boolean is home team winner return goals home goals away
|
is home team winner
|
public boolean is game tied return score sheet is game tied
|
gets the game tied attribute of the match object
|
public void update stats league element league element team stats team stats team get all stats league element player stats player stats player get all stats league element for int i 0 i team stats length i team stats i add penalty minutes minutes player stats i add penalty minutes minutes
|
update team and player stats
|
public int get goals home return goals home
|
return goals home team
|
public void set distance double distance this distance math round distance 100 100
|
sets the distance attribute of the flight object
|
public int get goals away return goals away
|
return goals away team
|
public team get team home return team home
|
gets the team home attribute of the match object
|
public team get team away return team away
|
gets the team away attribute of the match object
|
public void play super play team teams game controller get scenario get teams for int i 0 i teams length i if game controller get scenario is auto team teams i game controller get scenario get user by team teams i is auto training training generate training schedule teams i player players game controller get scenario get players int weekday ihm tools day of the week day day of week for int i 0 i players length i training train players i weekday
|
plays the event and trains the players
|
private void turn short messages on display a frame for fly by messages frame short message new frame message null false synchronized this is a workaround jinternal frame is not threadsafe synchronized this desktop add frame short message desktop get component count center frame frame short message frame short message set visible true
|
starts the short message frame
|
public score sheet get score sheet return score sheet
|
gets the score sheet attribute of the match object
|
public string get goalie training attribute int day int time return goalie training day time
|
gets the goalie training attribute attribute of the training schedule object
|
public vector get screen shots return screen shots
|
gets the screen shots attribute of the flight object
|
public int get points team team if is game tied return rules points for tied else if overtime played if this is team winner team return rules points for overtime win else return rules points for overtime loss else if this is team winner team return rules points for win else return rules points for loss
|
who gets how many points
|
public void end season save team stats history for int i 0 i teams length i teams i end season save player stats history player a player this get players int i size a player length for int i 0 i i size i a player i end season league owners for int i 0 i league owners length i league owners i end season
|
ends the season for history backup etc
|
public string get field player training attribute int day int time return field player training day time
|
gets the field player training attribute attribute of the training schedule
|
public vector get teams vector result new vector for int i 0 i leagues length i team tmp leagues i get teams for int n 0 n tmp length n result add tmp n return result
|
returns all teams from all leagues
|
public void set goalie training attribute string attribute int day int time goalie training day time attribute
|
sets the goalie training attribute attribute of the training schedule object
|
public void set league owner league owner league owner this league owner league owner
|
sets the owner of this league called by league owner
|
public vector get all league elements vector result new vector for int l 0 l league owners length l league leagues league owners l get leagues for int q 0 q leagues length q vector league elements leagues q get league elements for int n 0 n league elements size n result add league element league elements get n return result
|
returns all league elements in this scenario
|
public league owner get league owner return league owner
|
returns its owner
|
public user get user by team team team user users get users for int i 0 i users length i if users i get team equals team return users i return null
|
returns the owner of a team
|
public boolean is played return played
|
gets the played attribute of the match object
|
public void set announced announced true
|
sets element as announced
|
public boolean is team of league team team for int i 0 i teams length i if teams i equals team return true return false
|
lookup function to search a team within this league
|
public void set screen shots vector screen shots this screen shots screen shots
|
sets the screen shots attribute of the flight object
|
public void set league element group league element group league element group this league element group league element group
|
sets the league element group of this league element
|
public boolean replace team team old team team new team for int i 0 i teams length i if teams i equals old team teams i new team return true return false
|
replaces old team with new team
|
public team get winner if get home wins get away wins return team home else return team away
|
returns the winner of this competition
|
public league element group get league element group return this league element group
|
returns the league element group of this element null if none
|
public team get loser if get home wins get away wins return team away else return team home
|
returns the loser of this competition
|
public int get sort value return this rank
|
small helper for the comparable interface
|
public boolean is auto team team team user users get users for int i 0 i users length i if users i get team equals team return false return true
|
returns true if team is managed by the computer
|
public league get league return this league
|
returns owner of this element
|
public int get home wins int result 0 for int i 0 i best of i match tmp matches i if tmp is played tmp is team winner team home result return result
|
returns the count of home team wins
|
public int compare to object o league tmp league o if tmp get sort value get sort value return 1 if tmp get sort value get sort value return 1 return 0
|
implementation of the compare to function to sort the leagues
|
public int get away wins int result 0 for int i 0 i best of i match tmp matches i if tmp is played tmp is team winner team away result return result
|
returns the count of away team wins
|
public vector get users within matches vector matches boolean interested only vector result new vector for int n 0 n users length n for int i 0 i matches size i match tmp match matches get i if interested only league element le tmp get league element if users n is interested in league element le if tmp is user involved users n result add users n else if tmp is user involved users n result add users n return result
|
returns all users who are involved in one of the matches passed by
|
public boolean is competition won int needed wins best of 1 2 if get home wins needed wins get away wins needed wins return true else return false
|
returns boolean if competition is already won by a team
|
public string to string string owner this get league owner get name string name this get name return owner name
|
overrides the to string method with something more usefull
|
public void add match match match int round this matches round match
|
add match to the competition
|
public void add league element league element league element if league element null league elements add league element league element set league element group this
|
add league element to group
|
public match get match int round return matches round
|
returns the match of a round passed by
|
protected int get sort value switch sort criteria case sort rank return rank default return rank
|
returns sort value considering sort criteria
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.