Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions website/bot_overview.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html lang="en">
<head>
<?php include 'includes/header.php'; ?>

<title><?php echo ucwords(str_replace('_', ' ', basename(__FILE__, '.php'))); ?></title>

<?php include 'includes/prism_styles.php'; ?>
<link href="lib/bootstrap.min.css" rel="stylesheet">
<link href="style/general.css" rel="stylesheet">
<link href="style/learn.css" rel="stylesheet">
</head>
<body>
<div class="container">
<?php include 'includes/navbar.php'; ?>
<div class="row">
<?php include 'includes/learn_sidebar.php'; ?>
<div class="col-sm-9">
<h1><?php echo ucwords(str_replace('_', ' ', basename(__FILE__, '.php'))); ?></h1>
<?php echo $Parsedown->text(file_get_contents(__DIR__ . "/learn/bot/a_bots_life.md")); ?>
</div>
</div>
<?php include 'includes/footer.php'; ?>
</div>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<?php include 'includes/prism_scripts.php'; ?>
<script src="script/backend.js"></script>
<script src="script/general.js"></script>
</body>
</html>
3 changes: 2 additions & 1 deletion website/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"require": {
"lusitanian/oauth": "~0.3",
"swiftmailer/swiftmailer": "^5.4.3",
"aws/aws-sdk-php": "^3.19"
"aws/aws-sdk-php": "^3.19",
"erusev/parsedown": "^1.6.1"
}
}
38 changes: 38 additions & 0 deletions website/developing_a_bot.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<html lang="en">
<head>
<?php include 'includes/header.php'; ?>

<title><?php echo ucwords(str_replace('_', ' ', basename(__FILE__, '.php'))); ?></title>

<?php include 'includes/prism_styles.php'; ?>
<link href="lib/bootstrap.min.css" rel="stylesheet">
<link href="style/general.css" rel="stylesheet">
<link href="style/learn.css" rel="stylesheet">
</head>
<body>
<div class="container">
<?php include 'includes/navbar.php'; ?>
<div class="row">
<?php include 'includes/learn_sidebar.php'; ?>
<div class="col-sm-9">
<h1><?php echo ucwords(str_replace('_', ' ', basename(__FILE__, '.php'))); ?></h1>
<?php echo $Parsedown->text(file_get_contents(__DIR__ . "/learn/developing/local_development_environment.md")); ?>
<?php echo $Parsedown->text(file_get_contents(__DIR__ . "/learn/developing/submitting_a_bot.md")); ?>
</div>
</div>
<?php include 'includes/footer.php'; ?>
</div>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/seedrandom/2.4.0/seedrandom.min.js"></script>
<?php include 'includes/prism_scripts.php'; ?>
<script src="script/backend.js"></script>
<script src="script/general.js"></script>
<script src="lib/xss.js"></script>
<script src="lib/pixi.min.js"></script>
<script src="script/parsereplay.js"></script>
<script src="script/visualizer.js"></script>
</body>
</html>
32 changes: 32 additions & 0 deletions website/faqs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html lang="en">
<head>
<?php include 'includes/header.php'; ?>

<title><?php echo ucwords(str_replace('_', ' ', basename(__FILE__, '.php'))); ?></title>

<?php include 'includes/prism_styles.php'; ?>
<link href="lib/bootstrap.min.css" rel="stylesheet">
<link href="style/general.css" rel="stylesheet">
<link href="style/learn.css" rel="stylesheet">
</head>
<body>
<div class="container">
<?php include 'includes/navbar.php'; ?>
<div class="row">
<?php include 'includes/learn_sidebar.php'; ?>
<div class="col-sm-9">
<h1>FAQs</h1>
<?php echo $Parsedown->text(file_get_contents(__DIR__ . "/learn/faqs.md")); ?>
</div>
</div>
<?php include 'includes/footer.php'; ?>
</div>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<?php include 'includes/prism_scripts.php'; ?>
<script src="script/backend.js"></script>
<script src="script/general.js"></script>
</body>
</html>
44 changes: 44 additions & 0 deletions website/game_overview.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<html lang="en">
<head>
<?php include 'includes/header.php'; ?>

<title><?php echo ucwords(str_replace('_', ' ', basename(__FILE__, '.php'))); ?></title>

<?php include 'includes/prism_styles.php'; ?>
<link href="lib/bootstrap.min.css" rel="stylesheet">
<link href="style/general.css" rel="stylesheet">
<link href="style/learn.css" rel="stylesheet">
<style>
img {
max-width: 500px;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<?php include 'includes/navbar.php'; ?>
<div class="row">
<?php include 'includes/learn_sidebar.php'; ?>
<div class="col-sm-9">
<h1><?php echo ucwords(str_replace('_', ' ', basename(__FILE__, '.php'))); ?></h1>
<?php echo $Parsedown->text(file_get_contents(__DIR__ . "/learn/game/what_is_halite.md")); ?>
<?php echo $Parsedown->text(file_get_contents(__DIR__ . "/learn/game/game_rules.md")); ?>
</div>
</div>
<?php include 'includes/footer.php'; ?>
</div>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/seedrandom/2.4.0/seedrandom.min.js"></script>
<?php include 'includes/prism_scripts.php'; ?>
<script src="script/backend.js"></script>
<script src="script/general.js"></script>
<script src="lib/xss.js"></script>
<script src="lib/pixi.min.js"></script>
<script src="script/parsereplay.js"></script>
<script src="script/visualizer.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions website/includes/dropdowns.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<li>
<a href="basics_quickstart.php">Learn</a>
<a href="quickstart.php">Learn</a>
</li>
<li>
<a href="downloads.php">Download</a>
Expand All @@ -15,4 +15,4 @@
</li>
<li>
<a href="about.php">About</a>
</li>
</li>
123 changes: 83 additions & 40 deletions website/includes/learn_sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,85 +25,106 @@
}

/* active & hover links */
.bs-docs-sidebar .nav>.active>a,
.bs-docs-sidebar .nav>li>a:hover,
.bs-docs-sidebar .nav>.active>a,
.bs-docs-sidebar .nav>li>a:hover,
.bs-docs-sidebar .nav>li>a:focus {
text-decoration: none;
background-color: transparent;
text-decoration: none;
background-color: transparent;
border-left-color: #63ceca;
}

/* nested active links */
.bs-docs-sidebar .nav .nav>.active>a,
.bs-docs-sidebar .nav .nav>.active>a,
.bs-docs-sidebar .nav .nav>.active:hover>a,
.bs-docs-sidebar .nav .nav>.active:focus>a {
font-weight: 700;
border-left-color: #63ceca;
border-left-color: #63ceca;
font-weight: 500;
}

</style>

<nav class="col-sm-3 bs-docs-sidebar">
<ul id="sidebar" class="nav nav-stacked">
<li class="">
<span>The Basics</span>
<li id="quickstart">
<a href="quickstart.php">Quickstart</a>
<ul class="nav nav-stacked">
<li id="basics_quickstart">
<a href="basics_quickstart.php">Getting Started</a>
<li id="quickstart_dive_in">
<a href="quickstart.php#dive_in">Dive In</a>
</li>
<li id="basics_intro_halite">
<a href="basics_intro_halite.php">Introducing Halite</a>
</ul>
</li>
<li id="game_overview">
<a href="game_overview.php">Game Overview</a>
<ul class="nav nav-stacked">
<li id="game_overview_what_is_halite">
<a href="game_overview.php#what_is_halite">What is Halite?</a>
</li>
<li id="basics_improve_random">
<a href="basics_improve_random.php">Improving the Random Bot</a>
<li id="game_overview_game_rules">
<a href="game_overview.php#game_rules">Game Rules</a>
</li>
<li id="basics_faqs">
<a href="basics_faqs.php">FAQs</a>
</ul>
</li>
<li id="bot_overview">
<a href="bot_overview.php">Bot Overview</a>
<ul class="nav nav-stacked">
<li id="bot_overview_a_bots_life">
<a href="bot_overview.php#a_bots_life">A Bot's Life</a>
</li>
</ul>
</li>
<li class="">
<span>Guides</span>
<li id="developing_a_bot">
<a href="developing_a_bot.php">Developing A Bot</a>
<ul class="nav nav-stacked">
<li id="guides_development">
<a href="guides_development.php">Bot Development</a>
<li id="developing_a_bot_local_development_environment">
<a href="developing_a_bot.php#local_development_environment">Local Development Environment</a>
</li>
<li id="guides_libraries">
<a href="guides_libraries.php">Using 3rd Party Libraries</a>
<li id="developing_a_bot_submitting_a_bot">
<a href="developing_a_bot.php#submitting_a_bot">Submitting A Bot</a>
</li>
<li id="guides_strategy">
<a href="guides_strategy.php">Strategy Considerations</a>
</ul>
</li>
<li id="tournament_overview">
<a href="tournament_overview.php">Tournament Overview</a>
<ul class="nav nav-stacked">
<li id="tournament_overview_about_the_tournament">
<a href="tournament_overview.php#about_the_tournament">About the Tournament</a>
</li>
</ul>
</li>
<li class="">
<span>Rules</span>
<li id="server_overview">
<a href="server_overview.php">Server Overview</a>
<ul class="nav nav-stacked">
<li id="rules_game">
<a href="rules_game.php">Game Rules</a>
<li id="server_overview_hardware">
<a href="server_overview.php#hardware">Hardware</a>
</li>
<li id="rules_contest">
<a href="rules_contest.php">Contest Rules</a>
<li id="server_overview_software">
<a href="server_overview.php#software">Software</a>
</li>
</ul>
</li>
<li class="">
<span>Advanced</span>
<li id="tutorials">
<a href="tutorials.php">Tutorials</a>
<ul class="nav nav-stacked">
<li id="advanced_command_line">
<a href="advanced_command_line.php">Environment Command Reference</a>
<li id="tutorials_improving_the_random_bot">
<a href="tutorials.php#improving_the_random_bot">Improving The Random Bot</a>
</li>
</ul>
</li>
<li id="reference">
<span>Reference</span>
<ul class="nav nav-stacked">
<li id="advanced_replay_file">
<a href="advanced_replay_file.php">Replay File Reference</a>
</li>
<li id="advanced_game_server">
<a href="advanced_game_server.php">Game Server Reference</a>
<a href="advanced_replay_file.php">Replay File Format</a>
</li>
<li id="advanced_writing_sp">
<a href="advanced_writing_sp.php">Writing Your Own Starter Package</a>
</li>
</ul>
</li>
<li id="faqs">
<a href="faqs.php">FAQs</a>
</li>
</ul>
<hr>
<p style="line-height: 1.5em; font-size: 13px;">You can <a id="githubLink" href="">edit this content on GitHub</a> and send us a pull request!</p>
Expand All @@ -113,6 +134,28 @@
var fileName = location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
document.getElementById("githubLink").href = "https://github.com/HaliteChallenge/Halite/blob/master/website/"+fileName;

var name = fileName.split(".")[0];
document.getElementById(name).className = "active";
function markNavActive(event) {
var name = fileName.split(".")[0];

if (event) {
var l = document.createElement("a");
l.href = event.oldURL;
if (l.hash) {
document.getElementById(name + "_" + l.hash.substr(1)).removeAttribute("class")
} else {
document.getElementById(name).removeAttribute("class")
}
}

if (location.hash) {
document.getElementById(name).removeAttribute("class")
document.getElementById(name + "_" + location.hash.substr(1)).className = "active"
} else {
document.getElementById(name).className = "active"
}
}

markNavActive();

window.addEventListener("hashchange", markNavActive, false);
</script>
6 changes: 6 additions & 0 deletions website/includes/prism_scripts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/plugins/autolinker/prism-autolinker.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/plugins/show-language/prism-show-language.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/plugins/highlight-keywords/prism-highlight-keywords.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/plugins/autoloader/prism-autoloader.min.js"></script>
<script>Prism.plugins.autoloader.languages_path = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/components/'</script>
7 changes: 7 additions & 0 deletions website/includes/prism_styles.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
require __DIR__ . '/../vendor/autoload.php';
$Parsedown = new Parsedown();
?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/themes/prism.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/plugins/autolinker/prism-autolinker.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/plugins/show-language/prism-show-language.min.css" />
6 changes: 3 additions & 3 deletions website/install.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
apt-get update

apt-get install -y php5.6 php5.6-mysql apache2
apt-get install -y php5.6 php5.6-mbstring php5.6-mysql apache2
a2enmod rewrite expires

apt-get install -y python3 python3-pip
apt-get install -y python3 python3-pip

pip3 install trueskill boto paramiko pymysql

apt-get install -y zip
apt-get install -y zip

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Expand Down
Loading