input
stringlengths
10
828
output
stringlengths
5
107
public vector get league elements java util collections sort league elements return league elements
returns vector of all league elements in this group
public boolean needs winner return true
is winner needed in a match
public int get league element count return this league elements size
returns count of all league elements in this group
public int number of periods return 3
returns the number of periods
public boolean get play league playoffs return play league playoffs
gets the play league playoffs attribute of the std league owner object
public boolean play overtime return true
will overtime be played
public string to string string owner this get league get league owner get name string league this get league get name string name this get name key return owner league name
overrides the to string method with something more usefull
private void enable menus boolean enabled todo this probably doesn t turn of hot keys and submenus menu element elements menu bar get sub elements for int i 0 i menu bar get menu count i jmenu tmp menu bar get menu i tmp set enabled enabled
enables disables menus in the menubar
public int minutes per overtime return 20
minutes per overtime
public boolean needs winner return false
is winner needed in a match
public int get league playoffs best of return league playoffs best of
gets the league playoffs best of attribute of the std league owner object
public void generate matches rules rules new std playoff rules for int i 0 i playoff competitions length i playoff competitions i new playoff competition teams i teams teams length i 1 best of for int n 0 n best of n if n 2 0 playoff competitions i add match new match this teams i teams teams length i 1 rules n else playoff competitions i add match new match this teams teams length i 1 teams i rules n
generates schedule for this playoffs
public boolean sudden death return true
will sudden death be played
public boolean play overtime return false
will overtime be played
public boolean contignous overtime return false
play multiple overtimes until we have a winner
public void league part finished check for possible leagueplayoffstart if play league playoffs check for league playoffs
called each time when playoff outs are finished within a league
public int minutes per overtime return 0
minutes per overtime
public int players per overtime return 5
players per overtime
public boolean sudden death return false
will sudden death be played
public void new season for int n 0 n leagues length n leagues n new season league playoffs new std playoffs leagues length 1 for int i 0 i league playoffs length i league playoffs i new std playoffs 999 std constants key league league playoffs leagues i league playoffs best of 0 std league tmp std league leagues i tmp add league playoff element league playoffs i
resets all teams and the league playoffs
public int players per overtime return 0
players per overtime
public int points for win return 2
points for win
public int points for loss return 0 so what
points for loss
public void end season std league my leagues get std leagues for int i 0 i league playoffs length i check if switch is needed if my leagues i is team of league league playoffs i get winners 0 return else switch my leagues i replace team league playoffs i get losers 0 league playoffs i get winners 0 my leagues i 1 replace team league playoffs i get winners 0 league playoffs i get losers 0
season has ended switch teams if needed
public int points for tied return 1
points for tied
public int points for overtime win return 0
points for overtime win
public int points for overtime loss return 0
points for overtime loss
private void check for league playoffs std league my leagues get std leagues for int i 0 i league playoffs length i if my leagues i is last team known my leagues i 1 is first team known start league playoffs i
check if league playoffs may allready be started and starts them
public league standings get league standings return new league standings playoffs this get playoff competitions
returns the standings of this playoffs
public void play super play league generate playoffs level level
plays the event and calls generate playoffs level this
public void play super play league league playoffs finished
plays the event and calls league playoffs finished in the league
public void play super play this playoffs round played playoff round
plays the event and calls round played this
public boolean needs online team winner playoffs get winners 0 league league playoffs get league return league is team of league winner
returns if gui is needed if a team changes league
public void play super play league generate playouts level level
plays the event and calls generate playouts level this
public void play super play league league playouts finished
plays the event and calls league playouts finished on the league
public void generate calendar events scheduler helper scheduler helper for int i 0 i schedule length i calendar day scheduler helper get next free game day scheduler event game day matches event new scheduler event game day matches this day new vector this this get name key i 1 for int n 0 n games per round n event add match schedule i n scheduler event game day arrived tmp game controller get scenario get scheduler get stop before gameday event day tmp add scheduler game day event event game controller get scenario get scheduler add event event
generate game day events and their stop before events in the calendar
public int get offense player players team get players int total 0 int count 0 for int i 0 i players length i if players i get player attributes get position player attributes position center players i get player attributes get position player attributes position wing total players i get player attributes get overall average count return total count
returns the offense attribute
public int get defense player players team get players int total 0 int count 0 for int i 0 i players length i if players i get player attributes get position player attributes position defense total players i get player attributes get overall average count return total count
returns the defense attribute
public int get multi rounds return multi rounds
gets the multi rounds attribute of the std league object
public league standings get league standings team stats tmp new team stats teams length for int i 0 i teams length i tmp i teams i get stats this return new league standings table this tmp
returns the standings of this regular season
public void add goals for int goals for this goals for goals for
add goals to team stats
private void center frame jihm internal frame doc int x desktop get width doc get width 2 int y desktop get height doc get height 2 doc set location x y
centers a frame on the desktop
public int get goal tending player players team get players int total 0 int count 0 for int i 0 i players length i if players i get player attributes get position player attributes position goaltending total players i get player attributes get overall average count return total count
returns the goal tending attribute
public void add goals against int goals against this goals against goals against
add goals against to team stats
public int get overall return get goal tending get defense get offense 3
returns the overall attribute
protected int get sort value switch sort criteria case sort overall return get overall case sort offense return get offense case sort defense return get defense case sort goaltending return get goal tending default return get overall
returns sort value considering sort criteria
public int get playoff levels return playoff levels
gets the playoff levels attribute of the std league object
public void decrease double dec value dec if value 1 value 1 if value 99 value 99
decreases the attribute points
public void add game won int wins this games won wins
add won games to team stats
public void increase double inc value inc if value 99 value 99 if value 1 value 1
increases the attribute points
public void set value double value this value value if value 1 value 1
sets the value attribute of the player attribute object
public void add game lost int lost this games lost lost
add lost games to team stats
public void add game tied int ties this games tied ties
add tied games to team stats
public void show frame score sheet match match frame score sheet doc new frame score sheet current user match synchronized this desktop add doc desktop get component count this center frame doc doc set visible true
shows a team score sheet
protected int get sort value return get int value
returns sort value considering sort criteria
public int get playoffs best of return playoffs best of
gets the playoffs best of attribute of the std league object
public void add games played int played this games played played
add played games to team stats
public void add penalty minutes int penalty minutes this penalty minutes penalty minutes
add penalty minutes to team stats
public calendar get birthdate return birthdate
gets the age attribute of the player info object
public int get goals for return goals for
returns goals scored
public string get player name return last name first name
returns name of player last first name
public int get playout levels return playout levels
gets the playout levels attribute of the std league object
public int get goals against return goals against
returns goals against
private void create player attributes player attributes put gloveleft new player attribute gloveleft 0 player attributes put gloveright new player attribute gloveright 0 player attributes put stickleft new player attribute stickleft 0 player attributes put stickright new player attribute stickright 0 player attributes put puckcover new player attribute puckcover 0 player attributes put recover new player attribute recover 0 player attributes put fivehole new player attribute fivehole 0 player attributes put pokecheck new player attribute pokecheck 0
creates all player attributes for player
public void show frame team team team frame team doc new frame team current user team synchronized this desktop add doc desktop get component count doc set visible true
shows a team frame
public boolean is player in team player o player return this players contains o player
gets the player in team attribute of the team object
public int get goals diff return goals for goals against
returns goal difference
public void set random default attributes int position int overall super set random default attributes position overall set random default attributes overall
temporary method for tests position
public void create stats league league add stats for a league element to the player player stats league add new goalie stats this league
create stats for given league
public void create stats league element group league element group add stats for a league element to the player player stats group add new goalie stats this league element group
create stats for given league element group
public player attribute get specific player attribute string key return player attribute player attributes get key
gets the player attribute attribute of the goalie attributes object
public void create stats league element league element player stats add new goalie stats this league element
create new stats for league element passed by
public int get playouts best of return playouts best of
gets the playouts best of attribute of the std league object
public void new season team stats new vector team stats group new vector team stats league new vector this team stats total new team stats this null
reset team stats etc
public void set random default attributes int overall super set random default attributes overall player attribute pa get specific player attributes for int i 0 i pa length i pa i set value overall math abs r next int 20
sets the random default attributes attribute of the goalie attributes
public void new season super new season player stats total new field player stats this null
description of the method
public void create stats league league add stats for a league element to the player player stats league add new field player stats this league
create stats for given league
public void end season try this stats history add team stats total clone catch exception ignored
end of the year save stats into history
public int get specific player attributes average int count 0 double total 0 player attribute pa get specific player attributes for int i 0 i pa length i total pa i get value count return int total count
gets the average of all position goalie or field player specific
public void create stats league element group league element group add stats for a league element to the player player stats group add new field player stats this league element group
create stats for given league element group
public int get games won return games won
returns games won
public void create stats league element league element player stats add new field player stats this league element
create new stats for league element passed by
public void show frame player player player frame player doc new frame player current user player synchronized this desktop add doc desktop get component count doc set visible true
shows a player frame
public int get overall average double common get common player attributes average double player get specific player attributes average double total player attributes common player 2 double form get viaplayer attribute player attributes via form get value double energy get viaplayer attribute player attributes via energy get value double motivation get viaplayer attribute player attributes via motivation get value return int total player attributes form energy motivation 4
returns average attributes for player common specific form energy
public string to string return fieldplayer super to string
description of the method
public void set atc name string atc name this atc name atc name
sets the atc name attribute of the flight object
public int get games tied return games tied
returns games tied
public int get total attributes average double common get common player attributes average double player get specific player attributes average return int common player 2
returns the total average common specific attributes of the player
public void create stats league league add stats for a league element to the team team stats league add new team stats this league add stats to every player of this team for int i 0 i players size i player players get i create stats league
create stats for a league in players too
public int get goals return goals
gets the goals attribute of the player stats object
public int get games lost return games lost
returns games lost
private std league owner get std league owner return std league owner league owner
returns the owner of this league
public void create stats league element group league element group add stats for a league element to the team team stats group add new team stats this league element group add stats to every player of this team for int i 0 i players size i player players get i create stats league element group
create stats for a league element group in players too
public int get assists return assists
gets the assists attribute of the player stats object
public int get penalty minutes return penalty minutes
returns penalty minutes
public void show frame debug object obj string name frame debug doc new frame debug current user obj name synchronized this desktop add doc desktop get component count center frame doc doc set visible true
shows a debug frame
public int get scorer points return get goals get assists
gets the scorer points attribute of the player stats object
public void create stats league element league element add stats for a league element to the team team stats add new team stats this league element add stats to every player of this team for int i 0 i players size i player players get i create stats league element
create stats for a league element in players too
public string get atc name return atc name
gets the atc name attribute of the flight object
protected int get sort value switch sort criteria case sort games won return games won case sort games tied return games tied case sort games lost return games lost case sort goals for return goals for case sort goals against return goals against case sort games played return games played case sort goals difference return goals for goals against case sort points return points case sort penalty minutes return penalty minutes default return points
returns sort value considering sort criteria