Initial commit
[trapthecap.git] / doc / classes / Board.html
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE html
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <head>
8 <title>Class: Board</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">
13 // <![CDATA[
14
15 function popupCode( url ) {
16 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17 }
18
19 function toggleCode( id ) {
20 if ( document.getElementById )
21 elem = document.getElementById( id );
22 else if ( document.all )
23 elem = eval( "document.all." + id );
24 else
25 return false;
26
27 elemStyle = elem.style;
28
29 if ( elemStyle.display != "block" ) {
30 elemStyle.display = "block"
31 } else {
32 elemStyle.display = "none"
33 }
34
35 return true;
36 }
37
38 // Make codeblocks hidden by default
39 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
41 // ]]>
42 </script>
43
44 </head>
45 <body>
46
47
48
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">Board</td>
54 </tr>
55 <tr class="top-aligned-row">
56 <td><strong>In:</strong></td>
57 <td>
58 <a href="../files/lib/libttc_rb.html">
59 lib/libttc.rb
60 </a>
61 <br />
62 </td>
63 </tr>
64
65 <tr class="top-aligned-row">
66 <td><strong>Parent:</strong></td>
67 <td>
68 Object
69 </td>
70 </tr>
71 </table>
72 </div>
73 <!-- banner header -->
74
75 <div id="bodyContent">
76
77
78
79 <div id="contextContent">
80
81 <div id="description">
82 <p>
83 The game board
84 </p>
85
86 </div>
87
88
89 </div>
90
91 <div id="method-list">
92 <h3 class="section-bar">Methods</h3>
93
94 <div class="name-list">
95 <a href="#M000058">cache_valid_moves</a>&nbsp;&nbsp;
96 <a href="#M000057">layout</a>&nbsp;&nbsp;
97 <a href="#M000054">new</a>&nbsp;&nbsp;
98 <a href="#M000055">to_s</a>&nbsp;&nbsp;
99 <a href="#M000056">to_str</a>&nbsp;&nbsp;
100 </div>
101 </div>
102
103 </div>
104
105
106 <!-- if includes -->
107
108 <div id="section">
109
110
111
112
113
114 <div id="attribute-list">
115 <h3 class="section-bar">Attributes</h3>
116
117 <div class="name-list">
118 <table>
119 <tr class="top-aligned-row context-row">
120 <td class="context-item-name">centre</td>
121 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
122 <td class="context-item-desc"></td>
123 </tr>
124 <tr class="top-aligned-row context-row">
125 <td class="context-item-name">distance_between</td>
126 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
127 <td class="context-item-desc"></td>
128 </tr>
129 <tr class="top-aligned-row context-row">
130 <td class="context-item-name">positions</td>
131 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
132 <td class="context-item-desc"></td>
133 </tr>
134 <tr class="top-aligned-row context-row">
135 <td class="context-item-name">valid_moves</td>
136 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
137 <td class="context-item-desc"></td>
138 </tr>
139 </table>
140 </div>
141 </div>
142
143
144
145 <!-- if method_list -->
146 <div id="methods">
147 <h3 class="section-bar">Public Class methods</h3>
148
149 <div id="method-M000054" class="method-detail">
150 <a name="M000054"></a>
151
152 <div class="method-heading">
153 <a href="Board.src/M000054.html" target="Code" class="method-signature"
154 onclick="popupCode('Board.src/M000054.html');return false;">
155 <span class="method-name">new</span><span class="method-args">(spokes, spoke_length, arc_length)</span>
156 </a>
157 </div>
158
159 <div class="method-description">
160 <p>
161 A laborious procedure to create all the positions and tie them all together
162 </p>
163 </div>
164 </div>
165
166 <h3 class="section-bar">Public Instance methods</h3>
167
168 <div id="method-M000058" class="method-detail">
169 <a name="M000058"></a>
170
171 <div class="method-heading">
172 <a href="Board.src/M000058.html" target="Code" class="method-signature"
173 onclick="popupCode('Board.src/M000058.html');return false;">
174 <span class="method-name">cache_valid_moves</span><span class="method-args">()</span>
175 </a>
176 </div>
177
178 <div class="method-description">
179 <p>
180 Precompute the valid moves for this board, and the distances between each
181 pair of positions
182 </p>
183 </div>
184 </div>
185
186 <div id="method-M000057" class="method-detail">
187 <a name="M000057"></a>
188
189 <div class="method-heading">
190 <a href="Board.src/M000057.html" target="Code" class="method-signature"
191 onclick="popupCode('Board.src/M000057.html');return false;">
192 <span class="method-name">layout</span><span class="method-args">()</span>
193 </a>
194 </div>
195
196 <div class="method-description">
197 <p>
198 For each position, show its name and what it touches
199 </p>
200 </div>
201 </div>
202
203 <div id="method-M000055" class="method-detail">
204 <a name="M000055"></a>
205
206 <div class="method-heading">
207 <a href="Board.src/M000055.html" target="Code" class="method-signature"
208 onclick="popupCode('Board.src/M000055.html');return false;">
209 <span class="method-name">to_s</span><span class="method-args">()</span>
210 </a>
211 </div>
212
213 <div class="method-description">
214 </div>
215 </div>
216
217 <div id="method-M000056" class="method-detail">
218 <a name="M000056"></a>
219
220 <div class="method-heading">
221 <a href="Board.src/M000056.html" target="Code" class="method-signature"
222 onclick="popupCode('Board.src/M000056.html');return false;">
223 <span class="method-name">to_str</span><span class="method-args">()</span>
224 </a>
225 </div>
226
227 <div class="method-description">
228 </div>
229 </div>
230
231
232 </div>
233
234
235 </div>
236
237
238 <div id="validator-badges">
239 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
240 </div>
241
242 </body>
243 </html>