Skip to content

Commit 56d6a8e

Browse files
author
Nathan Merrill
committed
Merge remote-tracking branch 'origin/master'
2 parents 87dfbf3 + 7202692 commit 56d6a8e

File tree

1 file changed

+54
-56
lines changed

1 file changed

+54
-56
lines changed

README.md

Lines changed: 54 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ Here's a list of all of the components of KoTHComm:
2828

2929
I highly recommend using [Gradle](https://gradle.org/) to build your project. If you do, you can use KoTHComm as a library by adding the following to your build.gradle:
3030

31-
32-
repositories {
33-
maven { url "https://jitpack.io" }
34-
}
35-
dependencies {
36-
compile 'com.github.nathanmerrill:KoTHComm:1.0.1'
37-
}
31+
```gradle
32+
repositories {
33+
maven { url "https://jitpack.io" }
34+
}
35+
dependencies {
36+
compile 'com.github.nathanmerrill:KoTHComm:1.0.1'
37+
}
38+
```
3839

3940
If you don't want to use Gradle, you have 2 other options:
4041

@@ -43,57 +44,54 @@ If you don't want to use Gradle, you have 2 other options:
4344

4445
##Write some code
4546

46-
1. Make a player class. It should extend from AbstractPlayer. For example:
47-
48-
49-
import com.nmerrill.kothcomm.game.players.AbstractPlayer;
50-
51-
public abstract class TestPlayer extends AbstractPlayer<TestPlayer> {
52-
//This is the public API for submissions. Put the methods that they will need to implement here
53-
}
54-
55-
2. Make a game class. It should extend from AbstractGame. If your game has a fixed number of iterations, you can use IteratedGame. If your game will run off of an Action queue, you can use ActionQueueGame or MaxActionQueueGame.
56-
57-
58-
import com.nmerrill.kothcomm.game.scoring.Scoreboard;
59-
60-
public class TestGame extends AbstractGame<TestPlayer> {
61-
protected void setup() {
62-
//This method is called before your game starts.
63-
//Your random variable will be initialized, and use the players variable to access the players in the game
64-
}
65-
66-
@Override
67-
public Scoreboard<TestPlayer> getScores() {
68-
//You should return the current scores of all of the players
69-
//Ensure that the scores are as meaningful as possible, so that more data can be used to rank the players
70-
return null;
71-
}
72-
73-
@Override
74-
public boolean finished() {
75-
// You Should return true if the game is finished
76-
return false;
77-
}
78-
79-
@Override
80-
protected void step() {
81-
//Step will be called repeatedly until finished() returns true.
82-
//This is where the actual game logic goes
83-
}
47+
- Make a player class. It should extend from AbstractPlayer.
48+
```java
49+
import com.nmerrill.kothcomm.game.players.AbstractPlayer;
50+
public abstract class TestPlayer extends AbstractPlayer<TestPlayer> {
51+
//This is the public API for submissions. Put the methods that they will need to implement here
52+
}
53+
```
54+
- Make a game class. It should extend from AbstractGame. If your game has a fixed number of iterations, you can use IteratedGame. If your game will run off of an Action queue, you can use ActionQueueGame or MaxActionQueueGame.
55+
```java
56+
import com.nmerrill.kothcomm.game.scoring.Scoreboard;
57+
58+
public class TestGame extends AbstractGame<TestPlayer> {
59+
protected void setup() {
60+
//This method is called before your game starts.
61+
//Your random variable will be initialized, and use the players variable to access the players in the game
8462
}
8563

86-
3. Make a main class:
64+
@Override
65+
public Scoreboard<TestPlayer> getScores() {
66+
//You should return the current scores of all of the players
67+
//Ensure that the scores are as meaningful as possible, so that more data can be used to rank the players
68+
return null;
69+
}
8770

71+
@Override
72+
public boolean finished() {
73+
// You Should return true if the game is finished
74+
return false;
75+
}
8876

89-
import com.nmerrill.kothcomm.game.KotHComm;
90-
91-
public class Main {
92-
public static void main(String[] args){
93-
KotHComm<TestPlayer, TestGame> kotHComm = new KotHComm<>(TestGame::new);
94-
//KotHComm is highly customizable. A large number of methods on kotHComm allow you to set how you want your KotH to run.
95-
kotHComm.run(args);
96-
}
77+
@Override
78+
protected void step() {
79+
//Step will be called repeatedly until finished() returns true.
80+
//This is where the actual game logic goes
9781
}
98-
99-
Congrats, you've started your first King of the Hill challenge!
82+
}
83+
```
84+
- Make a main class:
85+
```java
86+
import com.nmerrill.kothcomm.game.KotHComm;
87+
88+
public class Main {
89+
public static void main(String[] args){
90+
KotHComm<TestPlayer, TestGame> kotHComm = new KotHComm<>(TestGame::new);
91+
//KotHComm is highly customizable. A large number of methods on kotHComm allow you to set how you want your KotH to run.
92+
kotHComm.run(args);
93+
}
94+
}
95+
```
96+
97+
Congrats, you've started your first King of the Hill challenge!

0 commit comments

Comments
 (0)