summaryrefslogtreecommitdiff
path: root/app/models/match.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/match.rb')
-rw-r--r--app/models/match.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/match.rb b/app/models/match.rb
index e37f9dc..20a36a5 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -37,4 +37,9 @@ class Match < ActiveRecord::Base
end #while
end
#handle_asynchronously :is_match_over
+
+ def win?(player)
+ winner.players.include? player
+ end
+
end