match.html

来自「This project does not contain a full, ru」· HTML 代码 · 共 461 行 · 第 1/2 页

HTML
461
字号
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">

<B>Constructor Detail</B></FONT></TH>

</TR>

</TABLE>



<A NAME="Match(ope.football.Club, ope.football.Club)"><!-- --></A><H3>

Match</H3>

<PRE>

public <B>Match</B>(<A HREF="../../ope/football/Club.html" title="class in ope.football">Club</A>&nbsp;homeClub,

             <A HREF="../../ope/football/Club.html" title="class in ope.football">Club</A>&nbsp;awayClub)</PRE>

<DL>

<DD>Constructs a match between teams of the given clubs,
 with no goals scored (yet).

<P>

<DL>

<DT><B>Parameters:</B><DD><CODE>homeClub</CODE> - the club whose team plays at home in the match<DD><CODE>awayClub</CODE> - the club whose team plays away in the match</DL>

</DL>



<!-- ============ METHOD DETAIL ========== -->



<A NAME="method_detail"><!-- --></A>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">

<B>Method Detail</B></FONT></TH>

</TR>

</TABLE>



<A NAME="getHomeClub()"><!-- --></A><H3>

getHomeClub</H3>

<PRE>

public <A HREF="../../ope/football/Club.html" title="class in ope.football">Club</A> <B>getHomeClub</B>()</PRE>

<DL>

<DD>Returns the club who hosts the match.

<P>

<DD><DL>



<DT><B>Returns:</B><DD>home club</DL>

</DD>

</DL>

<HR>



<A NAME="getAwayClub()"><!-- --></A><H3>

getAwayClub</H3>

<PRE>

public <A HREF="../../ope/football/Club.html" title="class in ope.football">Club</A> <B>getAwayClub</B>()</PRE>

<DL>

<DD>Returns the club who is visiting the home club to play the match.

<P>

<DD><DL>



<DT><B>Returns:</B><DD>away club</DL>

</DD>

</DL>

<HR>



<A NAME="addGoal(ope.football.Player)"><!-- --></A><H3>

addGoal</H3>

<PRE>

public void <B>addGoal</B>(<A HREF="../../ope/football/Player.html" title="class in ope.football">Player</A>&nbsp;scorer)</PRE>

<DL>

<DD>Records a goal as having been scored in the match.
 Whether the goal is a home goal or an away goal is
 determined by checking the employer of the given
 goalscorer. (If the given scorer is not employed by
 either club, the method does nothing.)

<P>

<DD><DL>

<DT><B>Parameters:</B><DD><CODE>scorer</CODE> - the player who scored the goal</DL>

</DD>

</DL>

<HR>



<A NAME="getHomeGoals()"><!-- --></A><H3>

getHomeGoals</H3>

<PRE>

public int <B>getHomeGoals</B>()</PRE>

<DL>

<DD>Returns the number of goals scored by the home team.

<P>

<DD><DL>



<DT><B>Returns:</B><DD>home team's goal count</DL>

</DD>

</DL>

<HR>



<A NAME="getAwayGoals()"><!-- --></A><H3>

getAwayGoals</H3>

<PRE>

public int <B>getAwayGoals</B>()</PRE>

<DL>

<DD>Returns the number of goals scored by the away team.

<P>

<DD><DL>



<DT><B>Returns:</B><DD>away team's goal count</DL>

</DD>

</DL>

<HR>



<A NAME="getTotalGoals()"><!-- --></A><H3>

getTotalGoals</H3>

<PRE>

public int <B>getTotalGoals</B>()</PRE>

<DL>

<DD>Returns the total number of goals scored by 
 the two teams.

<P>

<DD><DL>



<DT><B>Returns:</B><DD>total goal count</DL>

</DD>

</DL>

<HR>



<A NAME="getGoalDifference()"><!-- --></A><H3>

getGoalDifference</H3>

<PRE>

public int <B>getGoalDifference</B>()</PRE>

<DL>

<DD>Returns the goal difference of the match. If the home
 team won, a positive integer indicating the win margin
 is returned. Similarly, a negative integer indicates an
 away win. A tied match has a goal difference of zero.

<P>

<DD><DL>



<DT><B>Returns:</B><DD>goal difference</DL>

</DD>

</DL>

<HR>



<A NAME="getWinner()"><!-- --></A><H3>

getWinner</H3>

<PRE>

public <A HREF="../../ope/football/Club.html" title="class in ope.football">Club</A> <B>getWinner</B>()</PRE>

<DL>

<DD>Returns the club whose team won the match (or is about to
 win it, assuming the current result stands). That is,
 returns the club who has scored more goals than the other
 one.

<P>

<DD><DL>



<DT><B>Returns:</B><DD>winning team or <CODE>null</CODE> if the game is tied</DL>

</DD>

</DL>

<HR>



<A NAME="getWinningGoalScorer()"><!-- --></A><H3>

getWinningGoalScorer</H3>

<PRE>

public <A HREF="../../ope/football/Player.html" title="class in ope.football">Player</A> <B>getWinningGoalScorer</B>()</PRE>

<DL>

<DD>Returns the player who scored the so-called "winning goal".
 The winning goal of a match is the first goal for the winning
 team scoring which was "necessary" in light of the match scoreline.
 For instance, if the score is 4-2 to the home team, then the
 third goal scored by the home team is the "winning goal". 
 A tied match has no winning goal or winning goal scorer.

<P>

<DD><DL>



<DT><B>Returns:</B><DD>winning goal scorer, or <CODE>null</CODE> in case of a tie</DL>

</DD>

</DL>

<!-- ========= END OF CLASS DATA ========= -->

<HR>





<!-- ======= START OF BOTTOM NAVBAR ====== -->

<A NAME="navbar_bottom"><!-- --></A>

<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>

<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">

<TR>

<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">

<A NAME="navbar_bottom_firstrow"><!-- --></A>

<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">

  <TR ALIGN="center" VALIGN="top">

  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../ope/football/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>

  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>

  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>

  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>

  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>

  </TR>

</TABLE>

</TD>

<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>

</EM>

</TD>

</TR>



<TR>

<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

&nbsp;<A HREF="../../ope/football/Club.html" title="class in ope.football"><B>PREV CLASS</B></A>&nbsp;

&nbsp;<A HREF="../../ope/football/Player.html" title="class in ope.football"><B>NEXT CLASS</B></A></FONT></TD>

<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

  <A HREF="../../index.html?ope/football/Match.html" target="_top"><B>FRAMES</B></A>  &nbsp;

&nbsp;<A HREF="Match.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

&nbsp;<SCRIPT type="text/javascript">

  <!--

  if(window==top) {

    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');

  }

  //-->

</SCRIPT>

<NOSCRIPT>

  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>

</NOSCRIPT>





</FONT></TD>

</TR>

<TR>

<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>

<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>

</TR>

</TABLE>

<A NAME="skip-navbar_bottom"></A>

<!-- ======== END OF BOTTOM NAVBAR ======= -->



<HR>



</BODY>

</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?