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

📄 cccusing.htm

📁 java 象棋源程序
💻 HTM
📖 第 1 页 / 共 2 页
字号:
    <td width="26%">position</td>
    <td width="19%">&nbsp;</td>
    <td width="19%">&nbsp;</td>
  </tr>
  <tr>
    <td width="36%">Set board (see details below)</td>
    <td width="26%">board</td>
    <td width="19%">&nbsp;</td>
    <td width="19%">&nbsp;</td>
  </tr>
  <tr>
    <td width="36%">Set board (see details below)</td>
    <td width="26%">piece</td>
    <td width="19%">&nbsp;</td>
    <td width="19%">&nbsp;</td>
  </tr>
  <tr>
    <td width="36%">The move list (see details below)</td>
    <td width="26%">movelist / themovelist</td>
    <td width="19%">&nbsp;</td>
    <td width="19%">&nbsp;</td>
  </tr>
  <tr>
    <td width="36%">Move notation</td>
    <td width="26%">movenotation</td>
    <td width="19%">1/WXF, 2/ICCS</td>
    <td width="19%">1</td>
  </tr>
  <tr>
    <td width="36%">Set file name following wxf notation for reading a game (see details below)</td>
    <td width="26%">wxffilename</td>
    <td width="19%">a file name</td>
    <td width="19%">&nbsp;</td>
  </tr>
  <tr>
    <td width="36%">Read WXF game from parameter (<font color="#FF0000">new</font>)</td>
    <td width="26%">wxfgame</td>
    <td width="19%">WXF game</td>
    <td width="19%">&nbsp;</td>
  </tr>
  <tr>
    <td width="36%">Set board based on FEN (<font color="#FF0000">new</font>)</td>
    <td width="26%">FEN</td>
    <td width="19%">FEN notation</td>
    <td width="19%">&nbsp;</td>
  </tr>
</table>
<p><br>
a) Details of parameter <b>position</b>
</p>
<p>This parameter is used for setting up initial positions of all 32 pieces.  Each piece is represented by two       characters,
the first for column and the second for row.<br>
       The normal start position for all 32 piece is&nbsp;<br>
<font SIZE="1" COLOR="#0000c0"><br>
&lt;param name=</font><font SIZE="1" COLOR="#000000">"position"</font><font SIZE="1" COLOR="#0000c0">
 </font><font size="1"><font COLOR="#0000c0">
value=</font><font SIZE="1" COLOR="#000000">"</font>A0B0C0D0E0F0G0H0I0B2H2A3C3E3G3I3A9B9C9D9E9F9G9H9I9B7H7A6C6E6G6I6"&gt;</font>
</p>
<p>For disabling any piece at startup, change that piece position to "Z0". For convenience, you may add spaces and commas to separate pieces.
</p>
<p>
</p>
<p>b) Details of parameter <b>board</b>
</p>
<p>This parameter is used for setting up initial 90 positions of board. Pieces
are represented by characters: K, R, C, H, E, A, P, k, r, c, h, e, a, p - the
initial characters of King, Rook, Cannon, Horse, Elephant,&nbsp; Advisor, Pawn,
lower case characters for blue side, and upper case for red side. The empty
position is written by a dot (.).<br>
For convenience, you may add spaces and commas to separate pieces.
</p>
<p>For example:
</p>
<p><font size="2"><font COLOR="#0000c0">&lt;param name=</font><font SIZE="1" COLOR="#000000">board</font><font SIZE="1" COLOR="#0000c0">
value=</font><font SIZE="1" COLOR="#000000">"....ka...,....a....,P...e....,.........,........H,
.........,......r..,.........,...RA....,....KA...,"</font><font SIZE="1" COLOR="#0000c0">&gt;</font>
</font>
</p>
<p>
</p>
<p>c) Details of parameter <b>piece</b>
</p>
<p>This parameter is used for setting up initial positions of the existing
pieces. Pieces are represented by:
</p>
<ul>
  <li>One of characters: K, R, C, H, E, A, P, k, r, c, h, 
  e, a, p (the initial characters of King, Rook, Cannon, Horse, Elephant,&nbsp; 
  Advisor, Pawn, the lower case characters for blue side, and the upper case for 
  red side). 
  <li>Two       characters for position, the first for column and the second
for&nbsp; row.</li>
</ul>
<p>For convenience, you may add spaces and commas to separate pieces.
</p>
<p>For example:
</p>
<p><font size="2"><font COLOR="#0000c0">&lt;param name=</font><font COLOR="#000000">piece</font><font COLOR="#0000c0">
value=</font><font COLOR="#000000">"Ke0 Pf5 Ch5 Re6 kf8 ci7 rc3 rh2"</font><font COLOR="#0000c0">&gt;</font></font></p>
<p>&nbsp;</p>
<p>d) Details of parameter <b> movelist</b><br>
The format of each move step either P1+1[comment] for WXF or B2-E2[comment] for ICCS.
If you do not need comment, simply let it blank or remove both brackets.</p>
<p>The move list may be long, but do not break in the middle of the move list. For
convenience, you may add spaces and commas to move list.</p>
<p>If you need to display more than one move list, name the second movelist1,
third movelist2 and so on. For using them, turn on the answer button.</p>
<p>For example:
</p>
<p><font size="2"><font COLOR="#0000c0">&lt;param name=</font><font COLOR="#000000">movelist</font><font COLOR="#0000c0">
value=</font><font COLOR="#000000">"C8.5,C4.3,C6+7,R2+3,C6.3,P3+1,K5.6,P3.4[Good
game]"</font><font COLOR="#0000c0">&gt;</font></font></p>
<p>&nbsp;</p>
<p>e) Details file format for parameter <b> wxffilename</b></p>
<p>The above methods for input of a game may be not flexible for your home page,
where you need to update a new game frequently. This method could be more relevant. When updating a new game, you need to upload only one
small text file, following the WXF notation. You could see examples
of <A href="game1.txt">game1.txt</A>, <A href="game2.txt"> game2.txt</A> and <A href="game3.txt"> game3.txt</A> and see
<A href="cccpurpose.htm">example</A> of demo of some purposes.</p>
<p>&nbsp;</p>
<p>f) Details of <b>wxfgame</b></p>
<p>This method inputs a game on WXF format from parameter.</p>
<p><b>Note:</b></p>
<ul>
  <li>The enter characters
of the game should be convert into html notation &lt;br&gt; or &lt;br />
(because html pages don't use enter characters).</li>
  <li>If there is any charactor &quot; in middle of game content (such as for
    minute notation or in comments) the parametter will be end at this
    charactor.</li>
</ul>
<p><font size="2">&lt;<font color="#0000FF">param name</font>=wxfgame <font color="#0000FF">value</font>=&quot;FORMAT WXF
&lt;br />GAME Hu Ronghua(W)Wan Chunlin &lt;br />RESULT  1-0 &lt;br />RED  Hu Ronghua ; IGM ;&lt;br />BLACK  Wan Chunlin ; CM ;&lt;br />START{1. C2.5 h8+7 2. H2+3 r9.8 3. R1.2 h2+3
&lt;br />}END"></font></p>
<p>g) Details of <b> FEN</b></p>
<p>That method is for setting up a board based on FEN notation. For example:</p>
<p>&lt;<font color="#000080">param name</font>=fen <font color="#000080">value</font>=&quot;3a1k3/4a3h/9/6R1H/5r3/9/4r4/4C4/9/4K1E2 w - - -
1&quot;&gt;</p>
<p>&nbsp;</p>
<p><b>III. Some sample HTML sources</b></p>
<p>a. Sample HTML source 2 - turn on the sound, change color of board:</p>
<font SIZE="1" COLOR="#0000c0">
<blockquote>
  <p>&lt;applet archive=</font><font SIZE="1" COLOR="#000000">coffeecc.jar</font><font SIZE="1" COLOR="#0000c0">
  code=</font><font SIZE="1" COLOR="#000000">coffeecc.class</font><font SIZE="1" COLOR="#0000c0">
  width=</font><font SIZE="1" COLOR="#000000">450</font><font SIZE="1" COLOR="#0000c0">
  height=</font><font SIZE="1" COLOR="#000000">370</font><font SIZE="1" COLOR="#0000c0">
  &gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"sound"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"on"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"boardbackgroundcolor"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0xffff00"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"boardforecolor"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0xff"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>&lt;/applet&gt;</P></BLOCKQUOTE>
</font><p>b. Sample HTML source 3 - turn off all control panel, change one picture file
of pieces and use the other for board:</p>
<font SIZE="1" COLOR="#0000c0">
<blockquote>
  <p>&lt;applet archive=</font><font SIZE="1" COLOR="#000000">"coffeecc.jar"</font><font SIZE="1" COLOR="#0000c0">
  code=</font><font SIZE="1" COLOR="#000000">"coffeecc.class"</font><font SIZE="1" COLOR="#0000c0">
  width=</font><font SIZE="1" COLOR="#000000">"370"</font><font SIZE="1" COLOR="#0000c0">
  height=</font><font SIZE="1" COLOR="#000000">"420"</font><font SIZE="1" COLOR="#0000c0">
  &gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"controlpanel"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"pieceimage"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"demo/piece2d.gif"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"boardimage"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"demo/board2d.gif"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>&lt;/applet&gt;</P></BLOCKQUOTE>
</font><p>c. Sample HTML source 4 - set up game information, turn off notation tag
and copyright line:</p>
<font SIZE="1" COLOR="#0000c0">
<blockquote>
  <p>&lt;applet archive=</font><font SIZE="1" COLOR="#000000">"coffeecc.jar"</font><font SIZE="1" COLOR="#0000c0">
  code=</font><font SIZE="1" COLOR="#000000">"coffeecc.class"</font><font SIZE="1" COLOR="#0000c0">
  width=</font><font SIZE="1" COLOR="#000000">"430"</font><font SIZE="1" COLOR="#0000c0">
  height=</font><font SIZE="1" COLOR="#000000">"406"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"gameinfo"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"THE WORLD CHINESE CHESS
  CHAMPIONSHIP"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"gameinfoforecolor"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0x80"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"notationtag"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"off"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"redplayer"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"World Champion Challeger"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"blueplayer"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"World Champion"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"copyright"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"off"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>&lt;/applet&gt;</P></BLOCKQUOTE>
</font>
<p>d. Sample HTML source 5 - set up a puzzle and answer:</p>
<font SIZE="1" COLOR="#0000c0">
<blockquote>
  <p>&lt;applet code=</font><font SIZE="1" COLOR="#000000">"coffeecc.class"</font><font SIZE="1" COLOR="#0000c0">
  width=</font><font SIZE="1" COLOR="#000000">"440"</font><font SIZE="1" COLOR="#0000c0">
  height=</font><font SIZE="1" COLOR="#000000">"350"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"copyright"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"sound"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"on"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"controlpanel"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"1"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"ply"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"9"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"answer"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"1"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"startbutton"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"piece"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"Ke0,Cg4,Ha5,Ci5,Pb6,Pf8,Ri8,ad9,ke9,ch9,ae8,rh6,pe5,pi4,pg2,pf1,pb0"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"movelist"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"R1.2,R8-2,C1+4
  A5-6,C3+5A6+5,C3-6A5-6,C3.5A4+5,
  P4+1K5.4,P4.5K4+1,H9+7K4+1,H7+8K4-1,C1-1P2.3,H8-7K4+1,H7-5K4-1,
  C5.6P3.4,K5.6R8.9,H5+7K4+1,H7-6K4.5,H6+4K5.4,P8.7K4-1,H4-6A5+4,H6+5K4.5,C6.5"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"pieceimage"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"images\2dsmall.gif"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"boardbackgroundcolor"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0xffffff"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"boardforecolor"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0xb0b0bb"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>&lt;/applet&gt;</P></BLOCKQUOTE>
</font>

<p>e. Sample HTML source 6 - Read a game from file:</p>
<blockquote>
  <p><font SIZE="1" COLOR="#0000c0">&lt;applet archive=</font><font SIZE="1" COLOR="#000000">"coffeecc.jar"</font><font SIZE="1" COLOR="#0000c0">
  code=</font><font SIZE="1" COLOR="#000000">"coffeecc.class"</font><font SIZE="1" COLOR="#0000c0">
  width=</font><font SIZE="1" COLOR="#000000">"360"</font><font SIZE="1" COLOR="#0000c0">
  height=</font><font SIZE="1" COLOR="#000000">"311"</font><font SIZE="1" COLOR="#0000c0">
  &gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"pieceimage"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"demo/piecesmall.gif"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"movebegin"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"15"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"controlpanel"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"2"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"blueplayerkind"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"startbutton"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"off"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"copyright"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"wxffilename"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"game1.txt"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  &lt;/applet&gt;</p>
  </blockquote></FONT>
<p>&nbsp;</p>

<p>f. Sample HTML source 7 - Read a game from parametter:</p>
<blockquote>
  <p><font SIZE="1" COLOR="#0000c0">&lt;applet archive=</font><font SIZE="1" COLOR="#000000">"coffeecc.jar"</font><font SIZE="1" COLOR="#0000c0">
  code=</font><font SIZE="1" COLOR="#000000">"coffeecc.class"</font><font SIZE="1" COLOR="#0000c0">
  width=</font><font SIZE="1" COLOR="#000000">"360"</font><font SIZE="1" COLOR="#0000c0">
  height=</font><font SIZE="1" COLOR="#000000">"311"</font><font SIZE="1" COLOR="#0000c0">
  &gt;<br>
  &lt;param name=</font><font SIZE="1" COLOR="#000000">"blueplayerkind"</font><font SIZE="1" COLOR="#0000c0">
  value=</font><font SIZE="1" COLOR="#000000">"0"</font><font SIZE="1" COLOR="#0000c0">&gt;<br>
  </font><font size="2">&lt;<font color="#0000FF">param name</font>=&quot;wxfgame&quot;
  <font color="#0000FF">value</font>=&quot;FORMAT WXF
&lt;br />GAME Hu Ronghua(W)Wan Chunlin &lt;br />RESULT  1-0 &lt;br />RED  Hu Ronghua ; IGM ;&lt;br />BLACK  Wan Chunlin ; CM ;&lt;br />START{1. C2.5 h8+7 2. H2+3 r9.8 3. R1.2 h2+3
&lt;br />}END"><br>
  </font><font SIZE="1" COLOR="#0000c0">&lt;/applet&gt;</p>
  </blockquote></font>
<p>&nbsp;</p>

<p>&nbsp;</p>

<p><a href="http://www.nchess.com">Go to my home
page</a><font size="2"><br>
Email: <a href="mailto:webmaster@nchess.com">Pham Hong Nguyen</a></font></p>

</body>

</html>

⌨️ 快捷键说明

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