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: 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">
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">GameHandler
</td>
55 <tr class=
"top-aligned-row">
56 <td><strong>In:
</strong></td>
58 <a href=
"../files/src/play_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 Play a game to completion, given a set of player agents.
91 <div id=
"method-list">
92 <h3 class=
"section-bar">Methods
</h3>
94 <div class=
"name-list">
95 <a href=
"#M000011">new
</a>
96 <a href=
"#M000012">play
</a>
111 <div id=
"attribute-list">
112 <h3 class=
"section-bar">Attributes
</h3>
114 <div class=
"name-list">
116 <tr class=
"top-aligned-row context-row">
117 <td class=
"context-item-name">game
</td>
118 <td class=
"context-item-value"> [R]
</td>
119 <td class=
"context-item-desc"></td>
127 <!-- if method_list -->
129 <h3 class=
"section-bar">Public Class methods
</h3>
131 <div id=
"method-M000011" class=
"method-detail">
132 <a name=
"M000011"></a>
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>
141 <div class=
"method-description">
143 Create a game handler that uses a set of players
148 <h3 class=
"section-bar">Public Instance methods
</h3>
150 <div id=
"method-M000012" class=
"method-detail">
151 <a name=
"M000012"></a>
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>
160 <div class=
"method-description">
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
‘s a winner,
164 there
‘s only one player left, or the game has gone on too long.
176 <div id=
"validator-badges">
177 <p><small><a href=
"http://validator.w3.org/check/referer">[Validate]
</a></small></p>