RJ Osborne
9b2c2dde60
Converted class tournamentmatchgen into the GeneratesLoserNames module.
...
Here is another way to handle functionality that you may not want bloating your ActiveRecord class, yet belongs _on_ the model.
In this case, I feel there is an abstraction we are still sorely missing.
2015-05-27 23:29:51 -04:00
RJ Osborne
25c92a125d
Boutgen is dead. Tournaments can assign their own bout numbers.
2015-05-27 23:04:17 -04:00
RJ Osborne
c041286943
rough cut of getting rid of the matches collection being passed around
...
Associated Weight and Match-- the FK already existed in the domain
Reduced argument counts on assignLoserNames and assignBouts; trying to pass a Tournament around more
This was a tough nut to crack. Looking back, I tried to eat too much of the horse at once on this refactor.
2015-05-26 19:26:15 -04:00
RJ Osborne
20ef048f48
Poolbracket does not keep a matches collection
2015-05-26 19:26:15 -04:00
RJ Osborne
c855da0e6e
Ripped state out of Poolbracket
...
Implicitly added tournament_id to matches generated by Poolbracket
Removed explicit tournament assignment at save
2015-05-26 19:26:15 -04:00
RJ Osborne
091b7c4181
Cut the runtime by queueing the changes in memory and deferring database writes
...
Made some unspecified behavior explicit
2015-05-26 19:26:15 -04:00
RJ Osborne
2a57cafd6d
extracted wrestlers_for_pool method
...
removed unnecessary select
2015-05-23 08:07:11 -04:00
RJ Osborne
aec47ddf13
introduced a constructor for Pool and reduced arguments on roundRobin and generatePools
2015-05-23 06:15:44 -04:00
RJ Osborne
399923b949
removed the matches argument to generatePools and roundRobin
2015-05-23 06:01:15 -04:00
RJ Osborne
8177924635
move some variables to method scope
2015-05-23 05:46:28 -04:00
RJ Osborne
9d78cd52d2
Composed the poolToBracket method. It should simply read as an outline of how to do its job.
2015-05-23 05:24:18 -04:00
RJ Osborne
44ec0b55f0
introduced constructor on TournamentMatchGen
2015-05-23 05:08:16 -04:00
R.J. Osborne
b56d72c762
generatePools has a nicer arity
2015-05-18 19:37:13 -04:00
R.J. Osborne
b6da441d54
Take a lot of weight arguments in generatePools
2015-05-18 19:05:28 -04:00
R.J. Osborne
ecb4c3d7de
Extracted a method
2015-05-18 18:38:39 -04:00
d68e4bc54f
got tests working and showed mats table if not logged in
2015-05-05 19:10:17 +00:00