{"id":15026692,"url":"https://github.com/marydn/shogi","last_synced_at":"2026-01-24T14:45:15.592Z","repository":{"id":149803239,"uuid":"239788772","full_name":"marydn/shogi","owner":"marydn","description":"Japanese variation of chess game written in PHP","archived":false,"fork":false,"pushed_at":"2020-04-23T11:08:45.000Z","size":252,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-14T09:14:57.042Z","etag":null,"topics":["chess","docker","game","japanese-chess","php","php74","shogi"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marydn.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-02-11T14:57:40.000Z","updated_at":"2021-03-12T15:27:29.000Z","dependencies_parsed_at":"2023-05-13T17:30:31.700Z","dependency_job_id":null,"html_url":"https://github.com/marydn/shogi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marydn/shogi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marydn%2Fshogi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marydn%2Fshogi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marydn%2Fshogi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marydn%2Fshogi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marydn","download_url":"https://codeload.github.com/marydn/shogi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marydn%2Fshogi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chess","docker","game","japanese-chess","php","php74","shogi"],"created_at":"2024-09-24T20:04:53.933Z","updated_at":"2026-01-24T14:45:15.578Z","avatar_url":"https://github.com/marydn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Table of Contents\n\n* [Environment setup](#environment-setup)\n  * [Needed tools](#needed-tools)\n  * [Application execution](#application-execution)\n  * [Tests execution](#tests-execution)\n* [Project explanation](#project-explanation)\n  * [Developed features](#developed-features)\n  * [Diving project structure](#diving-project-structure)\n  * [UI Preview](#ui-preview)\n\n## Environment setup\n\n### Needed tools\n\n1. [Install Docker](https://www.docker.com/get-started)\n2. Clone this project: `git clone https://github.com/marydn/shogi`\n3. Move to the project folder: `cd shogi`\n4. Install PHP dependencies and bring up the project Docker containers with Docker Compose: `make build`\n5. Check everything's up using: `$ docker-compose ps`. It should show `php` service up.\n\nNote: If you want to bring down Docker service use: `make destroy`\n\n### Application execution\n\nStart game using: `make play`\n\nEnd the game at any time by writing `quit` instead of entering a new move.\n\n### Tests execution\n\nExecute PHP Unit tests: `make test`\n\n## Project explanation\n\nOOP Design example for a variation of a Japanese chess version called [Shogi](https://en.wikipedia.org/wiki/Shogi).\n\n### Developed features:\n\n  * Console interactive interface\n  * Pieces placement\n  * Pieces movements\n  * Capture opponent's pieces\n  * Drop captured pieces (only Pawns)\n  * Pieces are automatically promoted when they reach promotion zone (last 3 rows)\n\n### Diving project structure:\n\n```bash\n$ tree -L 4 src\nsrc\n├── Board.php\n├── CliPrintableSpot.php # Decorator for console output\n├── Command\n│   └── GameCommand.php # Console output application\n├── CoordinateTranslator.php # Translate user's input to a valid coordinate to handle internally\n├── Exception\n│   ├── CoordinateNotFound.php\n│   ├── CoordinateNotWellFormedNotation.php\n│   ├── IllegalMove.php\n│   └── PieceNotFoundInInventory.php\n├── Game.php\n├── Move.php\n├── MovesList.php # Collection of Moves\n├── Notation.php # Every move is saved as a Notation object\n├── Pieces # Every piece in the Board\n│   ├── BasePiece.php\n│   ├── Bishop.php\n│   ├── GoldGeneral.php\n│   ├── King.php\n│   ├── Knight.php\n│   ├── Lance.php\n│   ├── Pawn.php\n│   ├── PieceDroppableInterface.php # This Interface is for pieces that can be droppable\n│   ├── PieceInterface.php\n│   ├── PiecePromotableInterface.php # This Interface is for pieces that can be promoted\n│   ├── Rook.php\n│   └── SilverGeneral.php\n├── PlayerInventory.php # Player's inventory\n├── Player.php # Every player of the game\n├── Shared\n│   ├── Collection.php # Abstract class for Objects that holds collections\n│   └── Enum.php # Abstract class for Objects used as an Enum value object\n├── Spot.php # Every spot in the Board\n└── ValueObject\n    ├── Coordinate.php # User's input\n    └── NotationType.php # ValueObject to identify the type of move\n```\n\n### UI Preview:\n\n![image info](./doc/images/demo.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarydn%2Fshogi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarydn%2Fshogi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarydn%2Fshogi/lists"}