1 <?xml version="1.0" encoding="iso-8859-1"?>
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
8 <title>Class: Piece</title>
9 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10 <meta http-equiv="Content-Script-Type" content="text/javascript" />
11 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12 <script type="text/javascript">
15 function popupCode( url ) {
16 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
19 function toggleCode( id ) {
20 if ( document.getElementById )
21 elem = document.getElementById( id );
22 else if ( document.all )
23 elem = eval( "document.all." + id );
27 elemStyle = elem.style;
29 if ( elemStyle.display != "block" ) {
30 elemStyle.display = "block"
32 elemStyle.display = "none"
38 // Make codeblocks hidden by default
39 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
49 <div id="classHeader">
50 <table class="header-table">
51 <tr class="top-aligned-row">
52 <td><strong>Class</strong></td>
53 <td class="class-name-in-header">Piece</td>
55 <tr class="top-aligned-row">
56 <td><strong>In:</strong></td>
58 <a href="../files/lib/libttc_rb.html">
65 <tr class="top-aligned-row">
66 <td><strong>Parent:</strong></td>
73 <!-- banner header -->
75 <div id="bodyContent">
79 <div id="contextContent">
81 <div id="description">
83 Each piece on the board is an object
91 <div id="method-list">
92 <h3 class="section-bar">Methods</h3>
94 <div class="name-list">
95 <a href="#M000052">capture</a>
96 <a href="#M000051">move_to</a>
97 <a href="#M000048">name</a>
98 <a href="#M000047">new</a>
99 <a href="#M000049">to_s</a>
100 <a href="#M000050">to_str</a>
115 <div id="attribute-list">
116 <h3 class="section-bar">Attributes</h3>
118 <div class="name-list">
120 <tr class="top-aligned-row context-row">
121 <td class="context-item-name">captured</td>
122 <td class="context-item-value"> [RW] </td>
123 <td class="context-item-desc"></td>
125 <tr class="top-aligned-row context-row">
126 <td class="context-item-name">colour</td>
127 <td class="context-item-value"> [R] </td>
128 <td class="context-item-desc"></td>
130 <tr class="top-aligned-row context-row">
131 <td class="context-item-name">contains</td>
132 <td class="context-item-value"> [RW] </td>
133 <td class="context-item-desc"></td>
135 <tr class="top-aligned-row context-row">
136 <td class="context-item-name">position</td>
137 <td class="context-item-value"> [RW] </td>
138 <td class="context-item-desc"></td>
146 <!-- if method_list -->
148 <h3 class="section-bar">Public Class methods</h3>
150 <div id="method-M000047" class="method-detail">
151 <a name="M000047"></a>
153 <div class="method-heading">
154 <a href="Piece.src/M000047.html" target="Code" class="method-signature"
155 onclick="popupCode('Piece.src/M000047.html');return false;">
156 <span class="method-name">new</span><span class="method-args">(number, position, colour)</span>
160 <div class="method-description">
164 <h3 class="section-bar">Public Instance methods</h3>
166 <div id="method-M000052" class="method-detail">
167 <a name="M000052"></a>
169 <div class="method-heading">
170 <a href="Piece.src/M000052.html" target="Code" class="method-signature"
171 onclick="popupCode('Piece.src/M000052.html');return false;">
172 <span class="method-name">capture</span><span class="method-args">(other_piece)</span>
176 <div class="method-description">
178 Caputre another piece
183 <div id="method-M000051" class="method-detail">
184 <a name="M000051"></a>
186 <div class="method-heading">
187 <a href="Piece.src/M000051.html" target="Code" class="method-signature"
188 onclick="popupCode('Piece.src/M000051.html');return false;">
189 <span class="method-name">move_to</span><span class="method-args">(new_position)</span>
193 <div class="method-description">
197 <div id="method-M000048" class="method-detail">
198 <a name="M000048"></a>
200 <div class="method-heading">
201 <a href="Piece.src/M000048.html" target="Code" class="method-signature"
202 onclick="popupCode('Piece.src/M000048.html');return false;">
203 <span class="method-name">name</span><span class="method-args">()</span>
207 <div class="method-description">
211 <div id="method-M000049" class="method-detail">
212 <a name="M000049"></a>
214 <div class="method-heading">
215 <a href="Piece.src/M000049.html" target="Code" class="method-signature"
216 onclick="popupCode('Piece.src/M000049.html');return false;">
217 <span class="method-name">to_s</span><span class="method-args">()</span>
221 <div class="method-description">
225 <div id="method-M000050" class="method-detail">
226 <a name="M000050"></a>
228 <div class="method-heading">
229 <a href="Piece.src/M000050.html" target="Code" class="method-signature"
230 onclick="popupCode('Piece.src/M000050.html');return false;">
231 <span class="method-name">to_str</span><span class="method-args">()</span>
235 <div class="method-description">
246 <div id="validator-badges">
247 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>