tests · FELS-Rohit/raganwald.github.com@1fb9e04 · GitHub
Skip to content

Commit 1fb9e04

Browse files
committed
tests
1 parent c2877f4 commit 1fb9e04

12 files changed

Lines changed: 171 additions & 579 deletions

0

Whitespace-only changes.

_posts/enchanted-forest/2013-03-24-zee-hackenbush-bird.coffee.md

Lines changed: 31 additions & 3 deletions

_site/atom.xml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<title>raganwald.com</title>
55
<link href="http://raganwald.com/"/>
66
<link type="application/atom+xml" rel="self" href="http://raganwald.com/atom.xml"/>
7-
<updated>2013-03-24T20:04:54-04:00</updated>
7+
<updated>2013-03-24T22:13:18-04:00</updated>
88
<id>http://raganwald.com/</id>
99
<author>
1010
<name>Reginald Braithwaite</name>
@@ -118,14 +118,35 @@
118118
○○&lt;br /&gt;
119119
●●● &lt;/p&gt;
120120

121-
&lt;p&gt;White still has a winning strategy: Take a single stone from the right of any row. It turns out that provided the game consists of one or more rows, where each row consist only of pebbles of the same colour, if one player has more pebbles than the other, that player always has a winning strategy.&lt;/p&gt;
121+
&lt;p&gt;White still has a winning strategy: Take a single stone from the right of any row.&lt;/p&gt;
122122

123-
&lt;hr /&gt;
123+
&lt;p&gt;Provided the game consists of one or more rows, where each row consist only of pebbles of the same colour, if one player has more pebbles than the other, that player always has a winning strategy.&lt;/p&gt;
124124

125-
&lt;p&gt;&lt;strong&gt;WARNING: THIS ESSAY IS A WORK IN PROGRESS&lt;/strong&gt;&lt;/p&gt;
125+
&lt;h3 id=&quot;maudes-simple-evaluator&quot;&gt;maude’s simple evaluator&lt;/h3&gt;
126+
127+
&lt;p&gt;Maude started with the following notes:&lt;/p&gt;
128+
129+
&lt;pre&gt;&lt;code&gt;{isArray, any} = require 'underscore'
130+
131+
white = {}
132+
black = {}
133+
134+
class HackenstringGame
135+
validRow = (row) -&amp;gt;
136+
isArray(row) and every(row, (stone) -&amp;gt; stone is white or stone is black)
137+
constructor: (@rows) -&amp;gt;
138+
throw 'invalid' unless every(@rows, validRow)
139+
140+
describe &quot;HackenstringGame&quot;, -&amp;gt;
141+
142+
it &quot;shouldn't throw an error for no rows&quot;, -&amp;gt;
143+
expect( -&amp;gt; new HackenStringGame([]) ).not.toThrow new Error('invalid')
144+
&lt;/code&gt;&lt;/pre&gt;
126145

127146
&lt;hr /&gt;
128147

148+
&lt;p&gt;&lt;strong&gt;WARNING: THIS ESSAY IS A WORK IN PROGRESS&lt;/strong&gt;&lt;/p&gt;
149+
129150
&lt;p&gt;notes:&lt;/p&gt;
130151
&lt;div class=&quot;footnotes&quot;&gt;
131152
&lt;ol&gt;

_site/enchanted-forest/hackenbush.html

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,35 @@ <h2 id="hackenstrings">Hackenstrings</h2>
174174
○○<br />
175175
●●● </p>
176176

177-
<p>White still has a winning strategy: Take a single stone from the right of any row. It turns out that provided the game consists of one or more rows, where each row consist only of pebbles of the same colour, if one player has more pebbles than the other, that player always has a winning strategy.</p>
177+
<p>White still has a winning strategy: Take a single stone from the right of any row.</p>
178178

179-
<hr />
179+
<p>Provided the game consists of one or more rows, where each row consist only of pebbles of the same colour, if one player has more pebbles than the other, that player always has a winning strategy.</p>
180180

181-
<p><strong>WARNING: THIS ESSAY IS A WORK IN PROGRESS</strong></p>
181+
<h3 id="maudes-simple-evaluator">maude’s simple evaluator</h3>
182+
183+
<p>Maude started with the following notes:</p>
184+
185+
<pre><code>{isArray, any} = require 'underscore'
186+
187+
white = {}
188+
black = {}
189+
190+
class HackenstringGame
191+
validRow = (row) -&gt;
192+
isArray(row) and every(row, (stone) -&gt; stone is white or stone is black)
193+
constructor: (@rows) -&gt;
194+
throw 'invalid' unless every(@rows, validRow)
195+
196+
describe "HackenstringGame", -&gt;
197+
198+
it "shouldn't throw an error for no rows", -&gt;
199+
expect( -&gt; new HackenStringGame([]) ).not.toThrow new Error('invalid')
200+
</code></pre>
182201

183202
<hr />
184203

204+
<p><strong>WARNING: THIS ESSAY IS A WORK IN PROGRESS</strong></p>
205+
185206
<p>notes:</p>
186207
<div class="footnotes">
187208
<ol>

_site/rss.xml

Lines changed: 26 additions & 5 deletions

_specs/2013-03-16-prelude.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

_specs/2013-03-16-scheinfinkel.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

_specs/2013-03-16-vireo.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)