Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 1 file changed
  • 0 comments
  • 1 contributor

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 app/models/game.rb
6 app/models/game.rb
@@ -30,6 +30,10 @@ def guess(user, letter)
30 30 hit = true
31 31 end
32 32 end
  33 + if new_masked_word == word.text
  34 + play_for(user).update_attribute(:score, play_for(user).score + 5)
  35 + end
  36 +
33 37 if hit
34 38 play_for(user).update_attribute(:score, play_for(user).score + 1)
35 39 else
@@ -55,7 +59,7 @@ def play_for(user)
55 59 end
56 60
57 61 def complete?
58   - guesses.count >= 4
  62 + guesses.count >= 4 || winner?
59 63 end
60 64
61 65 def winner?

No commit comments for this range

Something went wrong with that request. Please try again.