tabletop 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. data/.gitignore +1 -0
  2. data/Rakefile +1 -1
  3. data/doc/Fixnum.html +313 -0
  4. data/doc/Tabletop/Coin.html +351 -0
  5. data/doc/Tabletop/Die.html +480 -0
  6. data/doc/Tabletop/FudgeDie.html +315 -0
  7. data/doc/Tabletop/NotEnoughTokensError.html +146 -0
  8. data/doc/Tabletop/Pool.html +770 -0
  9. data/doc/Tabletop/Possibility.html +235 -0
  10. data/doc/Tabletop/Roll.html +731 -0
  11. data/doc/Tabletop/TokenStack.html +394 -0
  12. data/doc/Tabletop.html +185 -0
  13. data/doc/created.rid +8 -0
  14. data/doc/images/brick.png +0 -0
  15. data/doc/images/brick_link.png +0 -0
  16. data/doc/images/bug.png +0 -0
  17. data/doc/images/bullet_black.png +0 -0
  18. data/doc/images/bullet_toggle_minus.png +0 -0
  19. data/doc/images/bullet_toggle_plus.png +0 -0
  20. data/doc/images/date.png +0 -0
  21. data/doc/images/find.png +0 -0
  22. data/doc/images/loadingAnimation.gif +0 -0
  23. data/doc/images/macFFBgHack.png +0 -0
  24. data/doc/images/package.png +0 -0
  25. data/doc/images/page_green.png +0 -0
  26. data/doc/images/page_white_text.png +0 -0
  27. data/doc/images/page_white_width.png +0 -0
  28. data/doc/images/plugin.png +0 -0
  29. data/doc/images/ruby.png +0 -0
  30. data/doc/images/tag_green.png +0 -0
  31. data/doc/images/wrench.png +0 -0
  32. data/doc/images/wrench_orange.png +0 -0
  33. data/doc/images/zoom.png +0 -0
  34. data/doc/index.html +167 -0
  35. data/doc/js/darkfish.js +116 -0
  36. data/doc/js/jquery.js +32 -0
  37. data/doc/js/quicksearch.js +114 -0
  38. data/doc/js/thickbox-compressed.js +10 -0
  39. data/doc/lib/fixnum_rb.html +54 -0
  40. data/doc/lib/tabletop/pool_rb.html +54 -0
  41. data/doc/lib/tabletop/randomizers_rb.html +52 -0
  42. data/doc/lib/tabletop/roll_rb.html +52 -0
  43. data/doc/lib/tabletop/token_rb.html +52 -0
  44. data/doc/lib/tabletop/version_rb.html +52 -0
  45. data/doc/lib/tabletop_rb.html +52 -0
  46. data/doc/rdoc.css +763 -0
  47. data/lib/fixnum.rb +8 -0
  48. data/lib/tabletop/pool.rb +32 -1
  49. data/lib/tabletop/randomizers.rb +22 -1
  50. data/lib/tabletop/roll.rb +65 -10
  51. data/lib/tabletop/token.rb +7 -4
  52. data/lib/tabletop/version.rb +1 -1
  53. data/spec/randomizers_spec.rb +6 -1
  54. data/spec/spec_helper.rb +1 -1
  55. data/tabletop.gemspec +1 -0
  56. metadata +60 -5
@@ -0,0 +1,315 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Tabletop::FudgeDie</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="class">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="../index.html">Home</a>
25
+ <a href="../index.html#classes">Classes</a>
26
+ <a href="../index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="../lib/tabletop/randomizers_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="lib/tabletop/randomizers.rb">lib/tabletop/randomizers.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+ <!-- Parent Class -->
50
+ <div id="parent-class-section" class="section">
51
+ <h3 class="section-header">Parent</h3>
52
+
53
+ <p class="link"><a href="Die.html">Tabletop::Die</a></p>
54
+
55
+ </div>
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+ <!-- Method Quickref -->
64
+ <div id="method-list-section" class="section">
65
+ <h3 class="section-header">Methods</h3>
66
+ <ul class="link-list">
67
+
68
+ <li><a href="#method-c-new">::new</a></li>
69
+
70
+ <li><a href="#method-i-roll">#roll</a></li>
71
+
72
+ <li><a href="#method-i-to_s">#to_s</a></li>
73
+
74
+ <li><a href="#method-i-valid_value-3F">#valid_value?</a></li>
75
+
76
+ </ul>
77
+ </div>
78
+
79
+
80
+
81
+ </div>
82
+
83
+ <div id="project-metadata">
84
+
85
+
86
+
87
+ <div id="classindex-section" class="section project-section">
88
+ <h3 class="section-header">Class/Module Index
89
+ <span class="search-toggle"><img src="../images/find.png"
90
+ height="16" width="16" alt="[+]"
91
+ title="show/hide quicksearch" /></span></h3>
92
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
93
+ <fieldset>
94
+ <legend>Quicksearch</legend>
95
+ <input type="text" name="quicksearch" value=""
96
+ class="quicksearch-field" />
97
+ </fieldset>
98
+ </form>
99
+
100
+ <ul class="link-list">
101
+
102
+ <li><a href="../Tabletop.html">Tabletop</a></li>
103
+
104
+ <li><a href="../Tabletop/Coin.html">Tabletop::Coin</a></li>
105
+
106
+ <li><a href="../Tabletop/Die.html">Tabletop::Die</a></li>
107
+
108
+ <li><a href="../Tabletop/FudgeDie.html">Tabletop::FudgeDie</a></li>
109
+
110
+ <li><a href="../Tabletop/NotEnoughTokensError.html">Tabletop::NotEnoughTokensError</a></li>
111
+
112
+ <li><a href="../Tabletop/Pool.html">Tabletop::Pool</a></li>
113
+
114
+ <li><a href="../Tabletop/Roll.html">Tabletop::Roll</a></li>
115
+
116
+ <li><a href="../Tabletop/TokenStack.html">Tabletop::TokenStack</a></li>
117
+
118
+ <li><a href="../Fixnum.html">Fixnum</a></li>
119
+
120
+ </ul>
121
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
122
+ </div>
123
+
124
+
125
+ </div>
126
+ </div>
127
+
128
+ <div id="documentation">
129
+ <h1 class="class">Tabletop::FudgeDie</h1>
130
+
131
+ <div id="description" class="description">
132
+
133
+ <p>A <a href="FudgeDie.html">FudgeDie</a> is a kind of three-sided <a
134
+ href="Die.html">Die</a> that has a value of either 0, 1, or -1.</p>
135
+
136
+ </div><!-- description -->
137
+
138
+
139
+
140
+
141
+ <div id="5Buntitled-5D" class="documentation-section">
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+ <!-- Methods -->
151
+
152
+ <div id="public-class-method-details" class="method-section section">
153
+ <h3 class="section-header">Public Class Methods</h3>
154
+
155
+
156
+ <div id="new-method" class="method-detail ">
157
+ <a name="method-c-new"></a>
158
+
159
+
160
+ <div class="method-heading">
161
+ <span class="method-name">new</span><span
162
+ class="method-args">(init_value = nil)</span>
163
+ <span class="method-click-advice">click to toggle source</span>
164
+ </div>
165
+
166
+
167
+ <div class="method-description">
168
+
169
+
170
+
171
+
172
+
173
+ <div class="method-source-code" id="new-source">
174
+ <pre>
175
+ <span class="ruby-comment"># File lib/tabletop/randomizers.rb, line 61</span>
176
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">init_value</span> = <span class="ruby-keyword">nil</span>)
177
+ <span class="ruby-keyword">super</span>(<span class="ruby-value">3</span>, <span class="ruby-identifier">init_value</span>)
178
+ <span class="ruby-keyword">end</span></pre>
179
+ </div><!-- new-source -->
180
+
181
+ </div>
182
+
183
+
184
+
185
+
186
+ </div><!-- new-method -->
187
+
188
+
189
+ </div><!-- public-class-method-details -->
190
+
191
+ <div id="public-instance-method-details" class="method-section section">
192
+ <h3 class="section-header">Public Instance Methods</h3>
193
+
194
+
195
+ <div id="roll-method" class="method-detail ">
196
+ <a name="method-i-roll"></a>
197
+
198
+
199
+ <div class="method-heading">
200
+ <span class="method-name">roll</span><span
201
+ class="method-args">()</span>
202
+ <span class="method-click-advice">click to toggle source</span>
203
+ </div>
204
+
205
+
206
+ <div class="method-description">
207
+
208
+
209
+
210
+
211
+
212
+ <div class="method-source-code" id="roll-source">
213
+ <pre>
214
+ <span class="ruby-comment"># File lib/tabletop/randomizers.rb, line 64</span>
215
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">roll</span>
216
+ <span class="ruby-ivar">@value</span> = <span class="ruby-identifier">rand</span>(<span class="ruby-identifier">sides</span>)<span class="ruby-operator">-</span><span class="ruby-value">1</span>
217
+ <span class="ruby-keyword">end</span></pre>
218
+ </div><!-- roll-source -->
219
+
220
+ </div>
221
+
222
+
223
+
224
+
225
+ </div><!-- roll-method -->
226
+
227
+
228
+ <div id="to_s-method" class="method-detail ">
229
+ <a name="method-i-to_s"></a>
230
+
231
+
232
+ <div class="method-heading">
233
+ <span class="method-name">to_s</span><span
234
+ class="method-args">()</span>
235
+ <span class="method-click-advice">click to toggle source</span>
236
+ </div>
237
+
238
+
239
+ <div class="method-description">
240
+
241
+ <p>Returns either “[-]”, “[ ]”, or “[+]”, depending on @value</p>
242
+
243
+
244
+
245
+ <div class="method-source-code" id="to_s-source">
246
+ <pre>
247
+ <span class="ruby-comment"># File lib/tabletop/randomizers.rb, line 69</span>
248
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
249
+ <span class="ruby-node">&quot;[#{['-', ' ', '+'][@value+1]}]&quot;</span>
250
+ <span class="ruby-keyword">end</span></pre>
251
+ </div><!-- to_s-source -->
252
+
253
+ </div>
254
+
255
+
256
+
257
+
258
+ </div><!-- to_s-method -->
259
+
260
+
261
+ </div><!-- public-instance-method-details -->
262
+
263
+ <div id="protected-instance-method-details" class="method-section section">
264
+ <h3 class="section-header">Protected Instance Methods</h3>
265
+
266
+
267
+ <div id="valid_value-3F-method" class="method-detail ">
268
+ <a name="method-i-valid_value-3F"></a>
269
+
270
+
271
+ <div class="method-heading">
272
+ <span class="method-name">valid_value?</span><span
273
+ class="method-args">(val)</span>
274
+ <span class="method-click-advice">click to toggle source</span>
275
+ </div>
276
+
277
+
278
+ <div class="method-description">
279
+
280
+
281
+
282
+
283
+
284
+ <div class="method-source-code" id="valid_value-3F-source">
285
+ <pre>
286
+ <span class="ruby-comment"># File lib/tabletop/randomizers.rb, line 74</span>
287
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">valid_value?</span>(<span class="ruby-identifier">val</span>)
288
+ [<span class="ruby-value">1</span>,<span class="ruby-value">0</span>,<span class="ruby-value">-1</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">val</span>)
289
+ <span class="ruby-keyword">end</span></pre>
290
+ </div><!-- valid_value-3F-source -->
291
+
292
+ </div>
293
+
294
+
295
+
296
+
297
+ </div><!-- valid_value-3F-method -->
298
+
299
+
300
+ </div><!-- protected-instance-method-details -->
301
+
302
+ </div><!-- 5Buntitled-5D -->
303
+
304
+
305
+ </div><!-- documentation -->
306
+
307
+ <div id="validator-badges">
308
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
309
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
310
+ Rdoc Generator</a> 2</small>.</p>
311
+ </div>
312
+
313
+ </body>
314
+ </html>
315
+
@@ -0,0 +1,146 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Tabletop::NotEnoughTokensError</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="class">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="../index.html">Home</a>
25
+ <a href="../index.html#classes">Classes</a>
26
+ <a href="../index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="../lib/tabletop/token_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="lib/tabletop/token.rb">lib/tabletop/token.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+ <!-- Parent Class -->
50
+ <div id="parent-class-section" class="section">
51
+ <h3 class="section-header">Parent</h3>
52
+
53
+ <p class="link">ArgumentError</p>
54
+
55
+ </div>
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+ </div>
66
+
67
+ <div id="project-metadata">
68
+
69
+
70
+
71
+ <div id="classindex-section" class="section project-section">
72
+ <h3 class="section-header">Class/Module Index
73
+ <span class="search-toggle"><img src="../images/find.png"
74
+ height="16" width="16" alt="[+]"
75
+ title="show/hide quicksearch" /></span></h3>
76
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
77
+ <fieldset>
78
+ <legend>Quicksearch</legend>
79
+ <input type="text" name="quicksearch" value=""
80
+ class="quicksearch-field" />
81
+ </fieldset>
82
+ </form>
83
+
84
+ <ul class="link-list">
85
+
86
+ <li><a href="../Tabletop.html">Tabletop</a></li>
87
+
88
+ <li><a href="../Tabletop/Coin.html">Tabletop::Coin</a></li>
89
+
90
+ <li><a href="../Tabletop/Die.html">Tabletop::Die</a></li>
91
+
92
+ <li><a href="../Tabletop/FudgeDie.html">Tabletop::FudgeDie</a></li>
93
+
94
+ <li><a href="../Tabletop/NotEnoughTokensError.html">Tabletop::NotEnoughTokensError</a></li>
95
+
96
+ <li><a href="../Tabletop/Pool.html">Tabletop::Pool</a></li>
97
+
98
+ <li><a href="../Tabletop/Roll.html">Tabletop::Roll</a></li>
99
+
100
+ <li><a href="../Tabletop/TokenStack.html">Tabletop::TokenStack</a></li>
101
+
102
+ <li><a href="../Fixnum.html">Fixnum</a></li>
103
+
104
+ </ul>
105
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
106
+ </div>
107
+
108
+
109
+ </div>
110
+ </div>
111
+
112
+ <div id="documentation">
113
+ <h1 class="class">Tabletop::NotEnoughTokensError</h1>
114
+
115
+ <div id="description" class="description">
116
+
117
+ </div><!-- description -->
118
+
119
+
120
+
121
+
122
+ <div id="5Buntitled-5D" class="documentation-section">
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <!-- Methods -->
132
+
133
+ </div><!-- 5Buntitled-5D -->
134
+
135
+
136
+ </div><!-- documentation -->
137
+
138
+ <div id="validator-badges">
139
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
140
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
141
+ Rdoc Generator</a> 2</small>.</p>
142
+ </div>
143
+
144
+ </body>
145
+ </html>
146
+