+1
-1
silversuite.fen
+1
-1
silversuite.fen
···
48
48
rnbq1rk1/pp3ppp/4pn2/2pp4/1bPP4/2NBPN2/PP3PPP/R1BQ1RK1 b - - 1 7
49
49
r1bq1rk1/pppn1pbp/3p1np1/4p3/2PPP3/2N2NP1/PP3PBP/R1BQ1RK1 b - e3 0 8
50
50
rnbq1rk1/pp3pbp/2pp1np1/4p3/2PPP3/2N1BP2/PP2N1PP/R2QKB1R w KQ - 0 8
51
-
r1bq1rk1/pppnn1bp/3p4/3Pp1p1/2P1Pp2/2N2P2/PP2BBPP/R2QNRK1 w - - 0 13
51
+
r1bq1rk1/pppnn1bp/3p4/3Pp1p1/2P1Pp2/2N2P2/PP2BBPP/R2QNRK1 w - - 0 13
+6
-2
src/starfish_testing.gleam
+6
-2
src/starfish_testing.gleam
···
4
4
import gleam/int
5
5
import gleam/io
6
6
import gleam/list
7
-
import gleam/result
8
7
import gleam/string
9
8
import simplifile as file
10
9
import starfish
···
19
18
let assert Ok(games) =
20
19
fen_file
21
20
|> file.read
22
-
|> result.map(string.split(_, "\n"))
23
21
as "Failed to read game file"
22
+
23
+
let games =
24
+
games
25
+
|> string.split("\n")
26
+
// Use `#` for comments in the file
27
+
|> list.filter(fn(game) { game != "" && !string.starts_with(game, "#") })
24
28
25
29
io.println("Loaded games.")
26
30