summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/match.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/match.rb b/app/models/match.rb
index ac74fe1..83d7d72 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -38,4 +38,8 @@ class Match < ActiveRecord::Base
end
#handle_asynchronously :is_match_over
+ def win?(player)
+ winner.players.include? player
+ end
+
end