<<

NAME

CTF::Contest - Control Logic for CTF contests.

SYNOPSIS

    use CTF;
    CTF->load_from_io($config);

    my $contest = CTF::Contest->new();
    $contest->new_round(); #runs a scoring round, as configured by $config

ABSTRACT

Connects CTF::FlagServer/CTF::FlagClient exchange with the CTF::Score::* database abstraction, and bundles it together with a bit of control logic.

DESCRIPTION

This is probably the only object you'll need to instantiate to run a CTF contest.

It handles running scoring rounds, and dispatches service checking to the appropriate CTF::ServiceTest module.

If you would like to create additional "games" to run within the CTF Framework, this is the class you should subclass.

METHODS

When subclassing this, you'll need to provide the following methods.

new

 CTF::Contest->new();

Constructor. the base class takes no arguments.

new_round

 $contest->new_round();

This method goes through the process of scoring a new round. For this class, it does the following for each service (list of services pulled from the db):

poll the FlagServer for the flag for the current service

ask the service itself for the flag

"validate" the service. (magic).

update game state (see CTF::Score::*)

set new flag for the service.

SEE ALSO

http://crew.ccs.neu.edu/wiki/CaptureTheFlag

AUTHOR

Marc Dougherty <[email protected]>

Ian Langworth <http://langworth.com>

COPYRIGHT AND LICENSE

Copyright 2004 by Marc Dougherty

This software is released under the terms of the GPL. A copy of the GPL can be obtained here: http://www.fsf.org/licenses/gpl.html

<<

Unless otherwise noted, all content is copyright Marc Dougherty and is subject to a Creative Commons license.