all done and ugly :)

Any time you use the word “and” in a method name, it might be doing too much :)

On Oct 3, 2014, at 4:32 PM, Paul Hyman <notifications@github.com> wrote:

> In game_center/app/models/rps.rb:
> 
> > @@ -0,0 +1,23 @@
> > +class Rps < ActiveRecord::Base
> > +  @@choices = ["rock", "paper", "scissors"]
> > +
> > +  def initialize
> > +    @victory = {"scissors" => "rock", "rock" => "paper", "paper" => "scissors" }
> > +  end
> > +
> > +  def check_win(choice1)
> This method is doing too much. Its name should change to something like 'check_win_and_set_winner_text' or broken out into separate methods, e.g. 'check_winner(choice)' & 'set_winner_text(winning_plyr)' or something similar.
> 
> —
> Reply to this email directly or view it on GitHub.
> 

                                                           
Erik S. Trautman
Founder,  Viking Education
Founder,  The Odin Project
President,  Coding School Alumni Association