Browse files

add Gardens to card list

  • Loading branch information...
1 parent 29ac394 commit aeae6808fd67369a76cc310d8918f903259655bd @rspeer committed Sep 12, 2011
Showing with 6 additions and 5 deletions.
  1. +2 −1 card_list.txt
  2. +3 −3 docs/cards.html
  3. +1 −1 gh-pages
@@ -1,4 +1,4 @@
-Cards that are done (64)
+Cards that are done (65)
@@ -24,6 +24,7 @@ Estate
Fishing Village
Grand Market
Great Hall
@@ -759,9 +759,9 @@
<span class="nx">state</span><span class="p">.</span><span class="nx">gainOneOf</span><span class="p">(</span><span class="nx">state</span><span class="p">.</span><span class="nx">current</span><span class="p">,</span> <span class="nx">choices</span><span class="p">)</span>
<span class="p">}</span></pre></div> </td> </tr> <tr id="section-50"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-50">&#182;</a> </div> <h2>Utility functions</h2> </td> <td class="code"> <div class="highlight"><pre></pre></div> </td> </tr> <tr id="section-51"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-51">&#182;</a> </div> <p><code>transferCard</code> will move a card from one list to the end of another.</p>
-<p>This sometimes happens when iterating over a list of cards, which is
-unfortunate. The current solution is to call cleanupList, defined in
-the state.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">transferCard = </span><span class="nf">(card, fromList, toList) -&gt;</span>
+<p>If you are doing something to each card in a list which might result in
+that card being moved somewhere else, you <em>must</em> iterate over the list
+backwards. Otherwise you'll run off the end of the list.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">transferCard = </span><span class="nf">(card, fromList, toList) -&gt;</span>
<span class="k">if</span> <span class="nx">card</span> <span class="o">not</span> <span class="k">in</span> <span class="nx">fromList</span>
<span class="k">throw</span> <span class="k">new</span> <span class="nb">Error</span><span class="p">(</span><span class="s2">&quot;#{fromList} does not contain #{card}&quot;</span><span class="p">)</span>
<span class="nx">fromList</span><span class="p">.</span><span class="nx">remove</span><span class="p">(</span><span class="nx">card</span><span class="p">)</span>
Submodule gh-pages updated from b1090e to 0ba177

0 comments on commit aeae680

Please sign in to comment.