Contest Code
  Home arrow Contest Code arrow Capture The Flag -- The JUDGE
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CONTEST CODE

Capture The Flag -- The JUDGE
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2002-08-08

    Table of Contents:

    Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    testing, or judging script used for 'Capture The Flag' contest

    By : zombie

    >>> update >>> i just attached the zip file, because i might remove it from the server...

    because i used 5 php, 2 htm, 3 gif and one css file, i cant post it here (matt! smth to do?), so here is a link:

    http://www.fazi.co.yu/z/ctf.zip

    to fill up the space, i will just paste a README file that comes with ctf.zip...

    (click on the 'Open in new window' link abowe, to read this properly)
    -------------------------------------------------


    /* *\

    project: Capture The Flag: php competition on codewalkers.com

    file: README: detailing info on use of the judging script

    author: zombie: Tomica Jovanovic <tomica00@mail.com>

    disclaimer: this script is distributed in the hope that it will
    be useful, but it is provided "AS IS" and WITHOUT
    ANY WARRANTY, without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See the GNU General Public License for more details.

    more info: see: http://codewalkers.com/forum/?forum=php-contest

    \* */



    files:

    index.php if you want a quick star, just browse to this file

    README this file

    frames.htm left is grid, right is start, blah, blah...

    grid.php spits 30*30 grid with images and id's for javascript

    start.htm asks you for the names of robot scripts

    judge.php main judging script...

    random/ example robot playing as white (going down + right)

    rnd.red/ same thing, but for red (up + left)

    *.gif and some bells and whistles
    global.css



    how to use:

    name your robot scripts capture.php (as the rules say), place
    them in DIFERENT dirs (as random/ and rnd.red/ ) and start from
    the index.php. enter the names of the robot dirs in the text boxes,
    and fire it up.

    in the grid, white is represented as W, red as R, flags with
    green, sticky traps with yellow and teleports with blue cells.

    the button 'next' advances one STEP, not one turn. when you check
    checkbox 'auto', and click on 'next', script goes in auto mode,
    where it waits 1 sec after page gets loaded, and then advanced
    to the next step. (if you want to change this pause, find and
    change setTimeout() call in the judge.php function control());

    the table below, show names of two robots (dir names), their
    location, number of used sticky and teleport traps, death rays,
    and enemy locators for each robot script.

    last two rows show the move one robot made, and the response that
    robot WILL receive on the NEXT turn (maybe i could do this the
    opposite way, but this was logical to me)...

    clicking on 'start over' below the grid gets you to the point
    where you enter the names of robots to star over.



    known issues:

    browsers: because of javascript, this was an issue, and it took
    me some time, but now it is tested (and works) in
    IE 6.0, Mozzila 1.0 and Opera 6.0 on Windows 2000.
    it should work in NN 6.0+, and could in NN 4.0+

    500 limit: there is NO limit to 500 turns, as the rules say,
    because i wasn't going to make that kind off robots...

    STUCK: the judging script shows as the robot IS called on the
    turn when he is STUCK, but that is NOT the case, it
    just looks like that (had to do it that way ;)



    consequences:

    as it took me some time to recode this script to work in most
    browsers (i was ashamed to release a script that doesn't), the
    result is that maybe i am not going to have time to write a decent
    robot, and thus, not win.

    so, if you use this judging script, and you DO win, i would be
    very happy if you would give me a 'php addict' t-shirt (the one
    you will receive for winning) as that is all i need. ;)))




    Click to Download File



    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Contest Code Articles
    More By Codewalkers

     

    IBM® developerWorks developerWorks - FREE Tools!


    IBM – Taking Web 2.0 to Work

    You'll get answers to many questions and more from David Barnes, Lead Evangelist for IBM Emerging Internet Technologies. David will discuss aspects of Web 2.0 that bring value to corporations, academia, and government. He'll also discuss IBM's vision around Web 2.0, including the importance of remixability and consumability. The discussion will culminate with examples of various IBM Software Group solutions you can use to get ahead of the Web 2.0 adoption curve.
    FREE! Go There Now!


    NEW! Building a grid system using WS-Resource Transfer, Part 4: Using WS-RT for grid monitoring

    In this five-part "Building a grid system using WS-Resource Transfer" series, we look at the use of WS-Resource Transfer (WS-RT) in different areas of the grid environment -- from using it as a method for storing and recovering general information about grid-to-grid monitoring and management, and security. We also examine how WS-RT can be used for the distribution and division of work. In any grid, there is a huge amount of metadata about the grid that needs to be stored and distributed. Using WS-RT makes sharing the information, especially the precise information required by different systems in the grid, significantly easier. Here in Part 4, we look at both sides of the security session, both in terms of using WS-RT as an aid to the authorization process and at combining WS-Security with WS-RT for secure resource exchange.
    FREE! Go There Now!


    NEW! Download DB2 Express-C 9.5

    Visit IBM developerWorks to download IBM DB2 Express-C 9.5, a no-charge version of DB2 Express 9 database server. DB2 Express-C offers the same core data server base features as other DB2 Express editions and provides a solid base to build and deploy applications developed using C/C++, Java, .NET, PHP, and other programming languages.
    FREE! Go There Now!


    NEW! Rational 'Talks to You' Teleconference Series

    This Fall, IBM Rational talks to you directly through a special teleconference series giving you access to the best minds in IBM Rational - product experts and market thought leaders who will answer your questions during these pre-scheduled telephone conference calls. Register today!
    FREE! Go There Now!


    NEW! Rational Talks to You:Per Kroll on Rational Method Composer Plug-in customization

    Join this Rational Talks to You teleconference on December 11 at 1:00 pm ET to get tips on building your own plugins with Rational Method Composer. Get your questions answered!
    FREE! Go There Now!


    NEW! The role of integrated requirements management in software delivery

    This paper is about the critical role that a discipline called integrated require­ments management can play in helping to ensure that your business goals and IT investments are continuously aligned—whether you are sourcing, integrat­ing, building or maintaining software. It also looks at ways that automated IBM Rational® products can work together to help you use requirements in the very best way.
    FREE! Go There Now!


    NEW! Trial download: IBM Rational Tester for SOA Quality V7.0.1

    Get a free trial download of the latest version of IBM Rational Tester for SOA Quality V7.0.1, a functional and regression testing tool that enables the creation, comprehension, modification and execution of testing GUI-less Web services.
    FREE! Go There Now!


    NEW! Try the IBM SOA Sandbox for Process

    Visit IBM developerWorks to try the IBM SOA Sandbox for process. The SOA Sandbox for process focuses on providing a trial environment with the necessary tooling and components required to gain a better understanding of business processes and how to best improve existing business processes to derive value quickly.
    FREE! Go There Now!


    NEW! Web development with Eclipse Europa, Part 1: The Java EE for Eclipse

    It's a good time to be a Web developer. You've never had more choices in terms of technologies. There are so many great open source Web servers, databases, programming languages, and development frameworks. No matter what combination of technologies you prefer to work with, there is an integrated development environment (IDE) that can increase your productivity: Eclipse. In this tutorial, Part 1 of a three-part "Web development with Eclipse Europa" series on how to use Eclipse for Web development with Java technology, PHP, and Ruby, we'll see how the latest release of Eclipse -- Europa -- can be used to rapidly develop Java Web applications. We'll use Java Platform, Enterprise Edition 5 (Java EE) for Eclipse to build a Web application for tracking and calculating baseball statistics.
    FREE! Go There Now!


    NEW! Webcast: Quickly provide customized, integrated user interfaces with Lotus Notes 8

    IBM Lotus Notes 8 provides a wide range of developers the ability to provide customized, integrated user interfaces via composite applications and via custom sidebar and toolbar plug-ins. This webcast provides you with tips and techniques to use with out-of-the-box capabilities of Lotus Notes 8, and survey how you can share useful components within your own company and within a larger community.
    FREE! Go There Now!



    All FREE IBM® developerWorks Tools!

    CONTEST CODE ARTICLES

    - Visual Map Editor And Generator
    - Corridors map generator
    - PHP-JAVA Class Code Generator
    - Risk - print_map($game, $some_array_of_size_...
    - Risk: The Original ShowGame/Map
    - Showgame2
    - Risk map output
    - CTF-Judge, better "auto" controls
    - Capture The Flag -- The JUDGE


     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway