Initial commit
[trapthecap.git] / doc / classes / GameHandler.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: GameHandler</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">GameHandler</td>
54 </tr>
55 <tr class="top-aligned-row">
56 <td><strong>In:</strong></td>
57 <td>
58 <a href="../files/src/play_rb.html">
59 src/play.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 Play a game to completion, given a set of player agents.
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="#M000011">new</a>&nbsp;&nbsp;
96 <a href="#M000012">play</a>&nbsp;&nbsp;
97 </div>
98 </div>
99
100 </div>
101
102
103 <!-- if includes -->
104
105 <div id="section">
106
107
108
109
110
111 <div id="attribute-list">
112 <h3 class="section-bar">Attributes</h3>
113
114 <div class="name-list">
115 <table>
116 <tr class="top-aligned-row context-row">
117 <td class="context-item-name">game</td>
118 <td class="context-item-value">&nbsp;[R]&nbsp;</td>
119 <td class="context-item-desc"></td>
120 </tr>
121 </table>
122 </div>
123 </div>
124
125
126
127 <!-- if method_list -->
128 <div id="methods">
129 <h3 class="section-bar">Public Class methods</h3>
130
131 <div id="method-M000011" class="method-detail">
132 <a name="M000011"></a>
133
134 <div class="method-heading">
135 <a href="GameHandler.src/M000011.html" target="Code" class="method-signature"
136 onclick="popupCode('GameHandler.src/M000011.html');return false;">
137 <span class="method-name">new</span><span class="method-args">(players, limit = 5000, verbose = false, very_verbose = false)</span>
138 </a>
139 </div>
140
141 <div class="method-description">
142 <p>
143 Create a game handler that uses a set of players
144 </p>
145 </div>
146 </div>
147
148 <h3 class="section-bar">Public Instance methods</h3>
149
150 <div id="method-M000012" class="method-detail">
151 <a name="M000012"></a>
152
153 <div class="method-heading">
154 <a href="GameHandler.src/M000012.html" target="Code" class="method-signature"
155 onclick="popupCode('GameHandler.src/M000012.html');return false;">
156 <span class="method-name">play</span><span class="method-args">()</span>
157 </a>
158 </div>
159
160 <div class="method-description">
161 <p>
162 Play a game of Trap the Cap. If players make illegal moves, disqualify them
163 and restart the game. Terminate the game if there&#8216;s a winner,
164 there&#8216;s only one player left, or the game has gone on too long.
165 </p>
166 </div>
167 </div>
168
169
170 </div>
171
172
173 </div>
174
175
176 <div id="validator-badges">
177 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
178 </div>
179
180 </body>
181 </html>