···4848rnbq1rk1/pp3ppp/4pn2/2pp4/1bPP4/2NBPN2/PP3PPP/R1BQ1RK1 b - - 1 7
4949r1bq1rk1/pppn1pbp/3p1np1/4p3/2PPP3/2N2NP1/PP3PBP/R1BQ1RK1 b - e3 0 8
5050rnbq1rk1/pp3pbp/2pp1np1/4p3/2PPP3/2N1BP2/PP2N1PP/R2QKB1R w KQ - 0 8
5151-r1bq1rk1/pppnn1bp/3p4/3Pp1p1/2P1Pp2/2N2P2/PP2BBPP/R2QNRK1 w - - 0 135151+r1bq1rk1/pppnn1bp/3p4/3Pp1p1/2P1Pp2/2N2P2/PP2BBPP/R2QNRK1 w - - 0 13
+6-2
src/starfish_testing.gleam
···44import gleam/int
55import gleam/io
66import gleam/list
77-import gleam/result
87import gleam/string
98import simplifile as file
109import starfish
···1918 let assert Ok(games) =
2019 fen_file
2120 |> file.read
2222- |> result.map(string.split(_, "\n"))
2321 as "Failed to read game file"
2222+2323+ let games =
2424+ games
2525+ |> string.split("\n")
2626+ // Use `#` for comments in the file
2727+ |> list.filter(fn(game) { game != "" && !string.starts_with(game, "#") })
24282529 io.println("Loaded games.")
2630