This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts a simpleXML element into an array. Preserves attributes and everything. | |
* You can choose to get your elements either flattened, or stored in a custom index that | |
* you define. | |
* For example, for a given element | |
* <field name="someName" type="someType"/> | |
* if you choose to flatten attributes, you would get: | |
* $array['field']['name'] = 'someName'; | |
* $array['field']['type'] = 'someType'; | |
* If you choose not to flatten, you get: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Tournament Bracket Generator</title> | |
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> | |
<script src="http://underscorejs.org/underscore-min.js"></script> | |
<script> | |
$(document).on('ready', function() { | |
var knownBrackets = [2,4,8,16,32], // brackets with "perfect" proportions (full fields, no byes) |