summaryrefslogtreecommitdiff
path: root/app/models/match.rb
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-22 02:49:34 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-22 02:49:34 -0400
commit474a048ae4a4fae86e7fde93745f0ea79c7ed717 (patch)
tree63e87b93634d90c8236b09a02c19e37031d55304 /app/models/match.rb
parent7d40d2ed8bd686b32ff9bc620936a72044a610bc (diff)
parent9531e27d6414ca1e3c9a81b1a98f0550d74fad1d (diff)
Merge remote-tracking branch 'origin/master'
Conflicts: app/models/match.rb
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