+5
src/starfish_testing.gleam
+5
src/starfish_testing.gleam
···
14
14
const fen_file = "silversuite.fen"
15
15
16
16
pub fn main() -> Nil {
17
+
io.println("Loading games from file...")
18
+
17
19
let assert Ok(games) =
18
20
fen_file
19
21
|> file.read
20
22
|> result.map(string.split(_, "\n"))
21
23
as "Failed to read game file"
24
+
25
+
io.println("Loaded games. Running game 0...")
22
26
23
27
let outcomes =
24
28
list.index_map(games, fn(game, i) {
···
29
33
<> ", outcome "
30
34
<> string.inspect(outcome),
31
35
)
36
+
io.println("Running game " <> int.to_string(i + 1) <> "...")
32
37
outcome
33
38
})
34
39