doc/RockPaperScissors.html in RPSrb-0.1.4 vs doc/RockPaperScissors.html in RPSrb-0.1.5

- old
+ new

@@ -97,12 +97,10 @@ <section class="description"> </section> - - <section id="5Buntitled-5D" class="documentation-section"> @@ -186,11 +184,11 @@ <div class="method-source-code" id="continue-source"> <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 42</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">continue</span>(<span class="ruby-identifier">str1</span>,<span class="ruby-identifier">str2</span>,<span class="ruby-identifier">str3</span>) +<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">continue</span>(<span class="ruby-identifier">str1</span>,<span class="ruby-identifier">str2</span>,<span class="ruby-identifier">str3</span>) <span class="ruby-identifier">puts</span> <span class="ruby-identifier">str1</span> <span class="ruby-identifier">print</span> <span class="ruby-identifier">str2</span> <span class="ruby-identifier">gets</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">str3</span> <span class="ruby-keyword">end</span></pre> @@ -222,11 +220,11 @@ <div class="method-source-code" id="new-source"> <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> +<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span> <span class="ruby-ivar">@player_score</span> = <span class="ruby-ivar">@computer_score</span> = <span class="ruby-ivar">@ties</span> = <span class="ruby-value">0</span> <span class="ruby-keyword">end</span></pre> </div> </div> @@ -265,11 +263,11 @@ <div class="method-source-code" id="final_outcome-source"> <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 117</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">final_outcome</span>(<span class="ruby-identifier">pl</span>, <span class="ruby-identifier">co</span>) +<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">final_outcome</span>(<span class="ruby-identifier">pl</span>, <span class="ruby-identifier">co</span>) <span class="ruby-keyword">return</span> <span class="ruby-value">:WIN</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">pl</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">co</span> <span class="ruby-keyword">return</span> <span class="ruby-value">:LOSE</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">pl</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">co</span> <span class="ruby-keyword">end</span></pre> </div> @@ -301,11 +299,11 @@ <div class="method-source-code" id="play-source"> <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 59</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">play</span>(<span class="ruby-identifier">winning_score</span>) +<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">play</span>(<span class="ruby-identifier">winning_score</span>) <span class="ruby-keyword">while</span> <span class="ruby-ivar">@player_score</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">winning_score</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@computer_score</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">winning_score</span> <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\nPlayer score: #{@player_score}, &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot;Computer score: #{@computer_score}, Ties: #{@ties}.\n&quot;</span> <span class="ruby-identifier">player</span> = <span class="ruby-identifier">player_choice</span> <span class="ruby-identifier">computer</span> = <span class="ruby-constant">COMPUTER_CHOICES</span>.<span class="ruby-identifier">sample</span> <span class="ruby-comment"># chooses a random option</span> @@ -364,11 +362,11 @@ <div class="method-source-code" id="player_choice-source"> <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 93</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">player_choice</span> +<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">player_choice</span> <span class="ruby-identifier">loop</span> <span class="ruby-keyword">do</span> <span class="ruby-identifier">print</span> <span class="ruby-string">&quot;\nChoose: Rock (r), Paper (p), or Scissors (s): &quot;</span> <span class="ruby-identifier">choice</span> = <span class="ruby-identifier">gets</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">NTRY_TO_SYM</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">choice</span>) <span class="ruby-keyword">return</span> <span class="ruby-constant">NTRY_TO_SYM</span>[<span class="ruby-identifier">choice</span>] @@ -409,11 +407,11 @@ <div class="method-source-code" id="player_outcome-source"> <pre><span class="ruby-comment"># File lib/RockPaperScissors.rb, line 109</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">player_outcome</span>(<span class="ruby-identifier">plays</span>) +<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">player_outcome</span>(<span class="ruby-identifier">plays</span>) <span class="ruby-keyword">return</span> <span class="ruby-value">:WIN</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">WINNERS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">plays</span>) <span class="ruby-keyword">return</span> <span class="ruby-value">:LOSE</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">LOSERS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">plays</span>) <span class="ruby-keyword">return</span> <span class="ruby-value">:TIE</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-value">:WIN</span> <span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-value">:LOSE</span> <span class="ruby-keyword">end</span></pre> </div> @@ -431,10 +429,10 @@ </section> </main> <footer id="validator-badges" role="contentinfo"> - <p><a href="http://validator.w3.org/check/referer">Validate</a> - <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0. + <p><a href="https://validator.w3.org/check/referer">Validate</a> + <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.1. <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>. </footer>