Skip to content

Instantly share code, notes, and snippets.

@logankoester
Created June 28, 2011 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save logankoester/1051437 to your computer and use it in GitHub Desktop.
Save logankoester/1051437 to your computer and use it in GitHub Desktop.
module Tournament
class BaseTournament < ActiveRecord::Base
end
class KOTHTournament < BaseTournament
include Bracket::KOTH
end
class SwissTournament < BaseTournament
include Bracket::Swiss
end
class SingleEliminationTournament < BaseTournament
include Bracket::SingleElimination
end
end
module Bracket
module KOTH
workflow do
# state and events for a king of the hill tournament
end
end
module Swiss
workflow do
# state and events for a swiss tournament
end
end
module SingleElimination
workflow do
# state and events for a single elimination tournament
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment