ACM Bracket Manager
-
Upload
anjolie-melton -
Category
Documents
-
view
22 -
download
0
description
Transcript of ACM Bracket Manager
ACM Bracket ManagerCIS 598: CS Senior Project
Will Strohmeier
Outline
• Goals• Project Design• Database Design• Demo• Testing Phase• Future Work• Questions
Goals
• Provide the ACM club a way to quickly and easily manage brackets for LAN tournaments. • Do this through a web application that can
be moved to the ksuacmlanparty.info website. • Eliminate the time setting up the bracket
and make progressing through the tournament easier.
Project Design
•Web Technologies• ASP.NET• PHP• Symfony• Actions• Templates• Doctrine• Challonge API
Symfony Action
public function executeMatches(sfWebRequest $request) { $c = new ChallongeAPI(‘555hano…duyh7n'); $id = $request->getParameter('id'); $this->id = $id; $matches = $c->getMatches($id, array()); $this->matches = $matches; }
Symfony Template<tbody id="tableBody" > <?php foreach ($matches as $m) {
if ($m->state == 'open') { ?> <tr> <td><?php echo player_name($id, $m->{'player1-id'}) ?></td> <td>vs</td> <td align="right"><?php echo player_name($id, $m->{'player2-id'}) ?></td> <td align="center"><?php echo get_station($t->id, $m->id) ?></td> </tr> <?php } } ?></tbody>
Doctrine – PHP Object Relational Mapper
schema.yml:Brackets: actAs: {Timestampable: ~} columns: tourney_id: {type: integer} num_stations: {type: integer}
Stations: actAs: {Timestampable: ~} columns: tourney_id: {type: integer} station_num: {type: integer} match_id: {type: integer}
Database Design: Bracket/Stations
Stationstourney_idstation_nummatch_id
Bracketstourney_idnum_stations
1 0-*
Doctrine Queries:$b = new Brackets();$b->setTourney_id($id);$b->setNum_stations(0);$b->save();
Doctrine_Query::create() ->update('brackets b') ->set('b.num_stations', '?', $num) ->where('b.tourney_id = ?', $tid) ->execute();
Doctrine_Query::create() ->delete() ->from('stations s') ->where('s.tourney_id = ?', $id) ->execute();
Testing Phase:
• Held a test run on April 27th at the console ACM LAN Party. • At the LAN we used the Bracket Manager
for two tournaments• Brawl (45 people)• Naruto (16 people)
Problems:
• No bulk add for participants• No auto refresh on stations page• Better organization of current match list• Sluggish at times• Hard to find people for the match
Added Features
• Bulk add users• Auto refresh Stations page
Future Work
• Account system• Expand Database• fewer API calls• Better ordering of current matches • Text participants when their match is up
Questions?