Skip to content
Open
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
2 changes: 1 addition & 1 deletion environment/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CXXFLAGS += -std=c++11 -pthread -I ./
INSTALL_PATH?=/usr/local
INSTALL_PATH?=./
SOURCES=$(shell find . -name "*.cpp")
OBJECTS=$(SOURCES:%.cpp=%.o)
TARGET=halite
Expand Down
6 changes: 5 additions & 1 deletion environment/install.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/bin/bash

# Install Halite environment
curl "https://halite.io/downloads/environment/HaliteEnvironment-Source.zip" -o "HaliteEnvironment-Source.zip"
mkdir HaliteEnvironment-Source
unzip HaliteEnvironment-Source.zip -d HaliteEnvironment-Source
rm HaliteEnvironment-Source.zip
cd HaliteEnvironment-Source
make
make install
#make install
cd ../
mkdir -p bin
mv HaliteEnvironment-Source/halite ./bin/halite
rm -r HaliteEnvironment-Source
23 changes: 23 additions & 0 deletions website/archiveStarterPackages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@ cp -r CSharp/* Halite-C#-Starter-Package/
cp -r Scala/* Halite-Scala-Starter-Package/
rm Halite-Scala-Starter-Package/MyBot.java

# Add install.sh to all zip archives
cp ../environment/install.sh Halite-Python-Starter-Package/
cp ../environment/install.sh Halite-Java-Starter-Package/
cp ../environment/install.sh Halite-C++-Starter-Package/
cp ../environment/install.sh Halite-Rust-Starter-Package/
cp ../environment/install.sh Halite-Scala-Starter-Package/
cp ../environment/install.sh Halite-C#-Starter-Package/

# add halite.exe to all zip archives
mkdir Halite-Python-Starter-Package/bin
mkdir Halite-Java-Starter-Package/bin
mkdir Halite-C++-Starter-Package/bin
mkdir Halite-Rust-Starter-Package/bin
mkdir Halite-Scala-Starter-Package/bin
mkdir Halite-C#-Starter-Package/bin
cp downloads/environment/halite.exe Halite-Python-Starter-Package/bin/
cp downloads/environment/halite.exe Halite-Java-Starter-Package/bin/
cp downloads/environment/halite.exe Halite-C++-Starter-Package/bin/
cp downloads/environment/halite.exe Halite-Rust-Starter-Package/bin/
cp downloads/environment/halite.exe Halite-Scala-Starter-Package/bin/
cp downloads/environment/halite.exe Halite-C#-Starter-Package/bin/


zip -r Halite-Python-Starter-Package.zip Halite-Python-Starter-Package/
zip -r Halite-C++-Starter-Package.zip Halite-C++-Starter-Package/
zip -r Halite-Java-Starter-Package.zip Halite-Java-Starter-Package/
Expand Down
20 changes: 14 additions & 6 deletions website/downloads.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<h2>Starter Packages</h2>
<p>
This set of starter packages was uploaded on November 6nd. We fixed a minor bug with the getDistance() method in the Python starter package.
This set of starter packages was uploaded on November 6nd. We fixed a minor bug with the getDistance() method in the Python starter package. These packages also contain the Game Environment.
</p>
<p>
<ul>
Expand All @@ -29,21 +29,29 @@
</ul>
</p>

<h2>Running the Environment</h2>
<h3>Linux/macOS</h3>
<p>After unpacking the Started Package, open your terminal and cd into the unzipped directory. Run the install.sh script to download and install the environment. Then you can execute the environment with ./bin/halite </p>
<pre><code>cd Halite-Python-Starter-Package
./install.sh
./bin/halite -[some example arguments]</code></pre>

<h3>Windows</h3>
I'm not sure how to run it on windows?!


<h2>Game Environment</h2>
<p>If you'd rather download the Game Environment separately you can.</p>
<p>The environment is on version <b>1.0</b>. This version of the environment was posted on November 2nd.</p>

<h3>Linux/macOS</h3>
<p>Execute:</p>
<pre><code>sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/HaliteChallenge/Halite/master/environment/install.sh)"</code></pre>
<p>Now, the <code>halite</code> command will run the environment.</p>
<p>Now, the binary will be installed into ./bin/ and <code>./bin/halite</code> should work. </p>

<h3>Windows</h3>
<p>Download <a href="downloads/environment/halite.exe">halite.exe</a>.</p>

<h3>Building from Source</h3>
<p>Extract <a href="downloads/environment/HaliteEnvironment-Source.zip">this archive</a>.</p>
<p>If you are on Unix, run <code>make</code> and <code>sudo make install</code> inside the extracted folder. The <code>halite</code> command will now run the environment.</p>
<p>If you are on Windows, run the "make.bat" file. The file named "halite.exe" is your new environment binary.</p>
</div>
</div>
</div>
Expand Down