This commit is contained in:
Gu://em_ 2026-02-06 11:50:00 +01:00
commit 4e41c83b00
3 changed files with 218 additions and 0 deletions

31
.gitignore vendored Normal file
View file

@ -0,0 +1,31 @@
*.swp
.idea
.vertx
javadoc
server
*.class
*.log
*.ctxt
.mtj.tmp/
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
hs_err_pid*
replay_pid*
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.project
.classpath

56
README.md Normal file
View file

@ -0,0 +1,56 @@
# Creeps.
## Brief
This document is a quick overview of the creeps given files.
## What's in the archive
In the provided archive you will find the following files:
* `README.md`: this file.
* `pom.xml`: the sample maven project file that you must use for your project.
* `creeps-server.jar`: the server, for you to train on.
* `given.jar`: a compiled java library to help you in your endeavor.
* `given-javadoc.jar`: given library documentation, can be extracted with `jar xf`.
## Installing the given jar to your local repository
* Make sure the folder `~/.m2/repository/` exists, if not create it
(assuming you have built maven projects before, the folder should already
exist).
* Run the command `mvn install:install-file -Dfile=given.jar -DgroupId=com.epita -DartifactId=given -Dversion=4.0-SNAPSHOT -Dpackaging=jar`.
* You should be good to use the provided pom.xml file.
In case the assistants publish a new version of the file, simply repeat the process again.
### First run:
`java -jar creeps-server.jar --printAchievements=true` will print
the list of all achievements you can get.
### Tutorial:
`java -jar creeps-server.jar --trackAchievements=true --enableEnemies=false --enableGC=false --citizenFeedingRate=100000`
starts the server without enemies, without Hector and without starvation.
Ideal for early development.
### The game, standard configuration:
`java -jar creeps-server.jar --trackAchievements=true`
starts the server with the setup that will be used on the live server.
## Web client
The web client is enabled by default when running the local server.
To use it, you have to connect to `http://localhost:port` where port is
either 1337 by default or the value of the -httpPort option given to the
server.
## Documentation
The documentation is generated using Javadoc.
To use it, you can extract `given-javadoc.jar` with `jar xf`.
You can then open the `index.html` file using any web browser.

131
pom.xml Normal file
View file

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.epita</groupId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>creeps</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>21</maven.compiler.release>
<lombok.version>1.18.42</lombok.version>
<jackson.version>2.20.1</jackson.version>
<logback-classic.version>1.5.23</logback-classic.version>
<slf4j-api.version>2.0.17</slf4j-api.version>
<unirest-core.version>4.7.0</unirest-core.version>
<unirest-objectmapper.version>4.2.9</unirest-objectmapper.version>
<validation-api.version>2.0.1.Final</validation-api.version>
<junit-jupiter.version>5.14.1</junit-jupiter.version>
<given.version>4.0-SNAPSHOT</given.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/versions/*/module-info.class</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/LICENSE*</exclude>
<exclude>META-INF/NOTICE*</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com/epita/creeps/Program</Main-Class>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.1</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.epita</groupId>
<artifactId>given</artifactId>
<version>${given.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-classic.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.konghq</groupId>
<artifactId>unirest-java-core</artifactId>
<version>${unirest-core.version}</version>
</dependency>
<dependency>
<groupId>com.konghq</groupId>
<artifactId>unirest-objectmapper-jackson</artifactId>
<version>${unirest-objectmapper.version}</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${validation-api.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>