mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-05 06:07:20 +00:00
Working on Pool class
This commit is contained in:
31
app/models/pool.rb
Normal file
31
app/models/pool.rb
Normal file
@@ -0,0 +1,31 @@
|
||||
class Pool
|
||||
def onePool(wrestlers,weight_id,tournament)
|
||||
wrestlers.each do |w|
|
||||
w.isWrestlingThisRound?(1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
def twoPools(wrestlers)
|
||||
|
||||
end
|
||||
|
||||
|
||||
def fourPools(wrestlers)
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
def createMatch(w1,w2,round,tournament)
|
||||
|
||||
@match = Match.new
|
||||
@match.r_id = w1
|
||||
@match.g_id = w2
|
||||
@match.round = round
|
||||
@match.tournament_id = tournament
|
||||
@match.save
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user