blob: a23b3085e4ba13aaf1f5bc93a43a76345fb85916 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# thaar
`thaar` is a mini-game project for a
[Miradelphia](http://miradelphia.forumpro.fr) event called *Les grands jeux de
Thaar*, where gladiators from all around the world face each other on various
fights.
## How to play
First, you need to clone this repository.
```bash
git clone https://git.sr.ht/~lthms/thaar
```
`thaar` is implemented in Elixir using the `lkn` framework. There is no system
dependency, so starting the game server should be as simple as:
```bash
cd thaar
mix deps.get
iex -S mix
```
There is no admin panel of any sort, so creating and managing games is done via
`iex` REPL
```iex
iex(1)> Thaar.Admin.start_link "test"
:ok
```
You can now connect clients to the party:
```bash
${BROWSER} "client.html#test"
```
You might need to update `client.html` to provide the correct websocket
configuration, in case you have set up the server behind a http proxy such as
`nginx`.
Once your players are ready, go back to `iex` REPL and fill the missing places
with bots:
```iex
iex(2)> Thaar.Admin.spawn_bots "test"
```
You are ready to go! Start the party, and enjoy your players lose and win.
```iex
iex(3)> Thaar.Admin.start_party "test"
```
|