{"id":25237355,"url":"https://github.com/filipmnowak/ex_tic_tac_toe","last_synced_at":"2026-02-21T03:02:26.714Z","repository":{"id":50656410,"uuid":"519652421","full_name":"filipmnowak/ex_tic_tac_toe","owner":"filipmnowak","description":"Elixir, MapSet-based, variable board size, Tic-tac-toe implementation (WIP)","archived":false,"fork":false,"pushed_at":"2025-04-15T17:08:49.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-18T15:24:58.140Z","etag":null,"topics":["elixir","tic-tac-toe","work-in-progress"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filipmnowak.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-31T01:09:47.000Z","updated_at":"2025-04-15T17:08:53.000Z","dependencies_parsed_at":"2024-07-27T17:23:37.629Z","dependency_job_id":null,"html_url":"https://github.com/filipmnowak/ex_tic_tac_toe","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"02ba6875a82d591dac27f121ab6d11aed9b88ffc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/filipmnowak/ex_tic_tac_toe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipmnowak%2Fex_tic_tac_toe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipmnowak%2Fex_tic_tac_toe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipmnowak%2Fex_tic_tac_toe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipmnowak%2Fex_tic_tac_toe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipmnowak","download_url":"https://codeload.github.com/filipmnowak/ex_tic_tac_toe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipmnowak%2Fex_tic_tac_toe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"online","status_checked_at":"2026-02-21T02:00:07.432Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","tic-tac-toe","work-in-progress"],"created_at":"2025-02-11T16:00:18.221Z","updated_at":"2026-02-21T03:02:26.685Z","avatar_url":"https://github.com/filipmnowak.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExTicTacToe\n\nVerbose and non-idiomatic exercise in futility: `MapSet`-based [Tic-tac-toe](https://en.wikipedia.org/wiki/Tic-tac-toe) implementation, with variable game board size. (Though not optimized for bigger board sizes.)\n\n## TODO\n\n- ~~Set draw when it's draw.~~\n- ~~Illegal state not being communicated via API (currently: silent NOOP).~~\n- Tests are utter mess.\n- Leaky state checks.\n- Leaky init/new state API (reject invalid x and y values).\n- OTP app usage example.\n- Function annotations.\n\n## Installation\n\nThe package can be installed\nby adding `ex_tic_tac_toe` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ex_tic_tac_toe, \"~\u003e 0.2.1\"}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/ex_tic_tac_toe](https://hexdocs.pm/ex_tic_tac_toe).\n\n## Examples\n\n### Draw\n\n```elixir\niex\u003e alias ExTicTacToe, as: TTT\niex\u003e ttt = Enum.reduce(\n...\u003e    [{0, 0}, {1, 0}, {0, 1}, {1, 1}, {1, 2}, {0, 2}, {2, 0}, {2, 1}, {2, 2}],\n...\u003e    TTT.init(2, 2),\n...\u003e    fn coords, acc -\u003e\n...\u003e      TTT.progress_game(acc, TTT.mark(acc, acc.next_move, coords))\n...\u003e    end\n...\u003e )\n%ExTicTacToe.Engine.State{...}\niex\u003e TTT.phase(ttt) === {:draw, nil}\ntrue\niex\u003e TTT.Engine.State.Board.Helpers.render_board(ttt.board) |\u003e IO.puts()\n\n x | x | o |\n------------\n o | o | x |\n------------\n x | o | x |\n------------\n\n:ok\n```\n\n### Win\n\n```elixir\niex\u003e alias ExTicTacToe, as: TTT\niex\u003e ttt = Enum.reduce(\n...\u003e   [{0, 0}, {1, 0}, {0, 1}, {1, 1}, {0, 2}],\n...\u003e   TTT.init(2, 2, :x),\n...\u003e   fn coords, acc -\u003e\n...\u003e     TTT.progress_game(acc, TTT.mark(acc, acc.next_move, coords))\n...\u003e   end\n...\u003e )\n%ExTicTacToe.Engine.State{...}\niex\u003e TTT.phase(ttt) === {:won, :x}\ntrue\niex\u003e TTT.Engine.State.Board.Helpers.render_board(ttt.board) |\u003e IO.puts()\n\n x | x | x |\n------------\n o | o |   |\n------------\n   |   |   |\n------------\n\n:ok\n```\n\n### Illegal move\n\n```elixir\niex\u003e alias ExTicTacToe, as: TTT\niex\u003e ttt = Enum.reduce(\n...\u003e   [{0, 0}, {0, 0}],\n...\u003e   TTT.init(2, 2),\n...\u003e   fn coords, acc -\u003e\n...\u003e     TTT.progress_game(acc, TTT.mark(acc, acc.next_move, coords))\n...\u003e   end\n...\u003e )\n%ExTicTacToe.Engine.State{...}\niex\u003e TTT.phase(ttt) === {:illegal_state, nil}\ntrue\niex\u003e TTT.Engine.State.Board.Helpers.render_board(ttt.board) |\u003e IO.puts()\n\n o |   |   |\n------------\n   |   |   |\n------------\n   |   |   |\n------------\n\n:ok\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipmnowak%2Fex_tic_tac_toe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipmnowak%2Fex_tic_tac_toe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipmnowak%2Fex_tic_tac_toe/lists"}