Rather than repeat "winner == player1 ? @p1_wins+=1 : @p2_wins +=1" three times you should be able to move it out of your conditionals and move it to the end of the play method.