1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-31 03:25:45 +00:00
Commit Graph

102 Commits

Author SHA1 Message Date
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
9d8e0850bc Refactored generating matches 2015-05-26 18:27:55 +00:00
RJ Osborne
2a57cafd6d extracted wrestlers_for_pool method
removed unnecessary select
2015-05-23 08:07:11 -04:00
RJ Osborne
23d8c4e159 remove another argument from roundRobin 2015-05-23 06:38:55 -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
0e954c1789 Simplify construction a bit on some methods 2015-05-19 22:36:30 -04:00
R.J. Osborne
80dee9c234 An instance variable doesn't need to be passed around inside the class as an argument 2015-05-18 21:28:04 -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
R.J. Osborne
f6dd4e8625 Renamed boutNumber to bout_number to make the field consistent with the rest of the domain and database schema. 2015-05-17 08:13:52 -04:00
d68e4bc54f got tests working and showed mats table if not logged in 2015-05-05 19:10:17 +00:00
e7bfad8df0 Auto creating of high school weights 2015-04-27 14:58:22 -04:00
37470d9602 Moved match generation to a class and added tournament_type to tournaments. 2015-04-27 13:54:57 -04:00
9c5c12c413 Matchups_array completely removed. I do not know why has_many matches
does not work in tournaments. The solution was to add a matches
method.
2015-04-27 09:50:41 -04:00
6d39bcb868 Remove matchups_array 2015-04-26 15:58:15 -04:00
dd44efa869 Got stuff working with matches being saved individually. 2015-04-26 15:49:13 -04:00
d0d562ddf8 UpcomingMatches blows up if there are no wrestlers 2015-04-25 23:32:33 -04:00
b86211102b Revert "Revert "Moving away from matchups_array and saving matches individually""
This reverts commit 7b3fe2aaad.
2015-04-25 21:44:08 -04:00
7b3fe2aaad Revert "Moving away from matchups_array and saving matches individually"
This reverts commit 650a9ed7d6.
2015-04-25 13:59:59 -04:00
650a9ed7d6 Moving away from matchups_array and saving matches individually 2015-04-25 13:51:16 -04:00
1f67557fca Saving matchups_array 2015-04-21 22:31:29 -04:00
1c8ad90e8a Stopped saving matchups_array to test page speed 2015-04-21 22:15:18 -04:00
9de0d46e66 Saving matchups_array again. 2015-04-21 21:26:10 -04:00
b61431930f Now naming loser of boutNumber in boutgen. Boutgen only run once now. 2015-04-21 21:15:44 -04:00
367381208a Took out matchups_array saving, did not remove from database. 2015-04-21 17:13:26 -04:00
0e0fbb649d Removed unused files 2015-04-15 13:44:40 +00:00
2b1618c69b Cleaned up a bunch of shit. Depricated model methods and controller methods. 2015-04-15 13:42:12 +00:00
451e6911f8 Fixed totalRounds in weight 2015-04-01 13:44:01 +00:00
9b9f6a0353 Ordered all pool bracket rounds by bracket_position_number 2015-04-01 13:00:48 +00:00
9986c8b407 Removed unnecessary attr_accessors 2015-03-30 17:45:37 +00:00
522798a2c4 Removed score from school table and added attr_accessor 2015-03-28 18:38:09 +00:00
9976fd5869 Added before save on wrestler and weight. Also fixed fourPoolNumbers for weight 2015-03-28 18:16:32 +00:00
43d7089b44 Associated wrestlers and tournaments through weights 2015-03-28 14:48:36 +00:00
d7bbd32460 Formatting code and deleting uneeded methods 2015-03-28 14:43:14 +00:00
7146c401cf Test 5 match rule for bracket size 5-16 2015-03-27 19:07:49 +00:00
a821c28cf7 Created one page for all pools 2015-03-27 16:33:09 +00:00
4b6b20c912 Created integration test for poolbracket matchups 2015-03-27 12:52:35 +00:00
819d735480 Cleaned scaffold tests and set up fixtures needed for now. 2015-03-26 16:55:33 +00:00
a1fbcc4a9f Added weight_max to matchup 2015-03-25 13:08:36 +00:00
06a4d1b95d Fixed matchup object to hash and hash to object 2015-03-25 12:56:19 +00:00