Contest Code

  Home arrow Contest Code arrow Showgame2

By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2

    Table of Contents:



    Small improvement to xs0's showgame.php. Adds ability to jump ahead or back 4 turns to easily track your script's progress.

    By : thaneemmitt



    // END CONF



    if (isset($_GET["move"])) {
    if ($move<0) $move=0;
    if ($move>=$allmoves) $move=$allmoves-1;
    } else {

    echo "<center><h1>Turn ".($move+1)."</h1><br><br>";
    echo "<a href=\"$PHP_SELF?move=0\">Start</a> | ";
    echo "<a href=\"$PHP_SELF?move=".(max(0,$move-4))."\">Prev 4</a> | ";
    echo "<a href=\"$PHP_SELF?move=".(max(0,$move-1))."\">Prev</a> | ";
    echo "<a href=\"$PHP_SELF?move=".(min($move+1,$allmoves-1))."\">Next</a> | ";
    echo "<a href=\"$PHP_SELF?move=".(min($move+4,$allmoves-1))."\">Next 4</a> | ";
    echo "<a href=\"$PHP_SELF?move=".($allmoves-1)."\">Last</a>";
    echo "<br><br>";
    echo "<img src=\"showmap.php?board=".$inputfile[$move].(isset($inputfile[$move-1])?("&last=".$inputfile[$move-1]):"")."\">";

    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

    blog comments powered by Disqus


    - 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

    Developer Shed Affiliates


    © 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap