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: 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">
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">Board
</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">
91 <div id=
"method-list">
92 <h3 class=
"section-bar">Methods
</h3>
94 <div class=
"name-list">
95 <a href=
"#M000058">cache_valid_moves
</a>
96 <a href=
"#M000057">layout
</a>
97 <a href=
"#M000054">new
</a>
98 <a href=
"#M000055">to_s
</a>
99 <a href=
"#M000056">to_str
</a>
114 <div id=
"attribute-list">
115 <h3 class=
"section-bar">Attributes
</h3>
117 <div class=
"name-list">
119 <tr class=
"top-aligned-row context-row">
120 <td class=
"context-item-name">centre
</td>
121 <td class=
"context-item-value"> [R]
</td>
122 <td class=
"context-item-desc"></td>
124 <tr class=
"top-aligned-row context-row">
125 <td class=
"context-item-name">distance_between
</td>
126 <td class=
"context-item-value"> [R]
</td>
127 <td class=
"context-item-desc"></td>
129 <tr class=
"top-aligned-row context-row">
130 <td class=
"context-item-name">positions
</td>
131 <td class=
"context-item-value"> [R]
</td>
132 <td class=
"context-item-desc"></td>
134 <tr class=
"top-aligned-row context-row">
135 <td class=
"context-item-name">valid_moves
</td>
136 <td class=
"context-item-value"> [R]
</td>
137 <td class=
"context-item-desc"></td>
145 <!-- if method_list -->
147 <h3 class=
"section-bar">Public Class methods
</h3>
149 <div id=
"method-M000054" class=
"method-detail">
150 <a name=
"M000054"></a>
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>
159 <div class=
"method-description">
161 A laborious procedure to create all the positions and tie them all together
166 <h3 class=
"section-bar">Public Instance methods
</h3>
168 <div id=
"method-M000058" class=
"method-detail">
169 <a name=
"M000058"></a>
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>
178 <div class=
"method-description">
180 Precompute the valid moves for this board, and the distances between each
186 <div id=
"method-M000057" class=
"method-detail">
187 <a name=
"M000057"></a>
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>
196 <div class=
"method-description">
198 For each position, show its name and what it touches
203 <div id=
"method-M000055" class=
"method-detail">
204 <a name=
"M000055"></a>
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>
213 <div class=
"method-description">
217 <div id=
"method-M000056" class=
"method-detail">
218 <a name=
"M000056"></a>
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>
227 <div class=
"method-description">
238 <div id=
"validator-badges">
239 <p><small><a href=
"http://validator.w3.org/check/referer">[Validate]
</a></small></p>