Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-feel/blob/main/tests/round40/replay.wl # omega-feel This project has not described itself yet. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-feel / tests / round40 / replay.wl` 10 lines ยท 569 bytes Raw Blame History 1 (* Load tests/oracle.wl first. The first row is the two-arm class declaration. *) 2 replayFile[file_] := Module[{lines, data, events}, 3 lines = StringSplit /@ Import[file, "Lines"]; 4 If[First[lines] =!= {"c", "0", "2"}, Return[$Failed]]; 5 If[!AllTrue[Rest[lines], Length[#] == 5 && Take[#, 2] == {"t", "0"} && 6 AllTrue[Drop[#, 2], StringMatchQ[#, DigitCharacter ..] &] &], Return[$Failed]]; 7 data = ({ToExpression /@ #[[3 ;; 4]], ToExpression[#[[5]]]} &) /@ Rest[lines]; 8 events = First[run[2, data]]; 9 ("0 " <> StringRiffle[ToString /@ #, " "]) & /@ events 10 ]