⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 communication.html

📁 软件工程实践课程的答案哦
💻 HTML
📖 第 1 页 / 共 2 页
字号:
public <B>Communication</B>()</PRE>
<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="init()"><!-- --></A><H3>
init</H3>
<PRE>
public static void <B>init</B>()</PRE>
<DL>
<DD>Create the client socket and open the network stream
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setGameFace(GameFace)"><!-- --></A><H3>
setGameFace</H3>
<PRE>
public static void <B>setGameFace</B>(<A HREF="GameFace.html" title="class in &lt;Unnamed&gt;">GameFace</A>&nbsp;game)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setServerIP(java.lang.String)"><!-- --></A><H3>
setServerIP</H3>
<PRE>
public static void <B>setServerIP</B>(java.lang.String&nbsp;s)</PRE>
<DL>
<DD>set the IP of the server
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the serverIP</DL>
</DD>
</DL>
<HR>

<A NAME="setName(java.lang.String)"><!-- --></A><H3>
setName</H3>
<PRE>
public static void <B>setName</B>(java.lang.String&nbsp;s)</PRE>
<DL>
<DD>Set the name of the client
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - </DL>
</DD>
</DL>
<HR>

<A NAME="sendName()"><!-- --></A><H3>
sendName</H3>
<PRE>
public static void <B>sendName</B>()</PRE>
<DL>
<DD>send the client's name to the server
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="sendChatContent(java.lang.String)"><!-- --></A><H3>
sendChatContent</H3>
<PRE>
public static void <B>sendChatContent</B>(java.lang.String&nbsp;s)</PRE>
<DL>
<DD>send the chating information to other clients
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the chatting information</DL>
</DD>
</DL>
<HR>

<A NAME="sendPlayingField()"><!-- --></A><H3>
sendPlayingField</H3>
<PRE>
public static void <B>sendPlayingField</B>()</PRE>
<DL>
<DD>send the playing field of the client to the server in the form of a string following some protocal
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="requestRandomNumber()"><!-- --></A><H3>
requestRandomNumber</H3>
<PRE>
public static void <B>requestRandomNumber</B>()</PRE>
<DL>
<DD>request a set of random numbers from the server to create a bar
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="ClientReady(java.lang.String)"><!-- --></A><H3>
ClientReady</H3>
<PRE>
public static void <B>ClientReady</B>(java.lang.String&nbsp;s)</PRE>
<DL>
<DD>The client starts the game
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the ready information</DL>
</DD>
</DL>
<HR>

<A NAME="clear(Location)"><!-- --></A><H3>
clear</H3>
<PRE>
public static void <B>clear</B>(<A HREF="Location.html" title="class in &lt;Unnamed&gt;">Location</A>&nbsp;location)</PRE>
<DL>
<DD>send the message of a location cleared on the client to the server
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>location</CODE> - the specific location to be cleared</DL>
</DD>
</DL>
<HR>

<A NAME="clear(Bar)"><!-- --></A><H3>
clear</H3>
<PRE>
public static void <B>clear</B>(<A HREF="Bar.html" title="class in &lt;Unnamed&gt;">Bar</A>&nbsp;bar)</PRE>
<DL>
<DD>send the message of a bar cleared on the client to the server
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bar</CODE> - the specific bar to be cleared</DL>
</DD>
</DL>
<HR>

<A NAME="set(Location)"><!-- --></A><H3>
set</H3>
<PRE>
public static void <B>set</B>(<A HREF="Location.html" title="class in &lt;Unnamed&gt;">Location</A>&nbsp;location)</PRE>
<DL>
<DD>send the message of a location colored on the client to the server
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>location</CODE> - </DL>
</DD>
</DL>
<HR>

<A NAME="set(Bar)"><!-- --></A><H3>
set</H3>
<PRE>
public static void <B>set</B>(<A HREF="Bar.html" title="class in &lt;Unnamed&gt;">Bar</A>&nbsp;bar)</PRE>
<DL>
<DD>send the message of a bar colored on the client to the server
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bar</CODE> - the specific bar to be colored</DL>
</DD>
</DL>
<HR>

<A NAME="setScore(int)"><!-- --></A><H3>
setScore</H3>
<PRE>
public static void <B>setScore</B>(int&nbsp;score)</PRE>
<DL>
<DD>send the score of the client to the server
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>score</CODE> - the score to be sent</DL>
</DD>
</DL>
<HR>

<A NAME="IamOver()"><!-- --></A><H3>
IamOver</H3>
<PRE>
public static void <B>IamOver</B>()</PRE>
<DL>
<DD>The client's game is over, send the information to the server
<P>
<DD><DL>
</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="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="ColorSet.html" title="class in &lt;Unnamed&gt;"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="ContrastTheme.html" title="class in &lt;Unnamed&gt;"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="index.html?Communication.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Communication.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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -