{"id":15649928,"url":"https://github.com/book/golf-ye2013","last_synced_at":"2025-03-30T00:13:39.959Z","repository":{"id":10056690,"uuid":"12106551","full_name":"book/golf-ye2013","owner":"book","description":"Golf contest at YAPC Europe 2013","archived":false,"fork":false,"pushed_at":"2013-08-20T17:12:24.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-05T01:45:19.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","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/book.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}},"created_at":"2013-08-14T10:42:51.000Z","updated_at":"2014-09-09T13:24:19.000Z","dependencies_parsed_at":"2022-09-10T04:04:49.719Z","dependency_job_id":null,"html_url":"https://github.com/book/golf-ye2013","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/book%2Fgolf-ye2013","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/book%2Fgolf-ye2013/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/book%2Fgolf-ye2013/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/book%2Fgolf-ye2013/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/book","download_url":"https://codeload.github.com/book/golf-ye2013/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246258871,"owners_count":20748573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-03T12:32:36.754Z","updated_at":"2025-03-30T00:13:39.935Z","avatar_url":"https://github.com/book.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"My solution to the atari golf contest held during YAPC Europe 2013\nhttp://contest.reg.ru/\n\nPerl Golf from REG.RU\n\n# Legend\n\nYou are a son of an honorable Japanese nobleman of the Edo period. You\nhave always dreamed of becoming a programmer, but family traditions\nwere too strong: you were made apprentice of a Go master. After a brief\ntheoretical introduction, the master started giving you stone capturing\nproblems.\n\nThe tasks are easy, but it is obvious that you have absolutely no talent\nfor Go. Furthermore, the master whacks you with a bamboo stick for each\nproblem you fail to solve, and makes you eat your supper using only one\nchopstick. You are sick and tired of endless beating and starvation,\nand you decide to write a program that will solve problems for you. And\nsince paper is rather expensive in the Edo period, the program has to\nbe as short as possible.\n\n\n# Go game basics\n\nGo is a very ancient strategic table game which appeared in China several\nthousands of years ago and reached its golden age in Japan. The game is\nplayed by two players who alternately place black and white stones on\nboard grid intersections. A stone (or a group of stones) is \"captured\" and\ntaken off the board if it gets surrounded on all sides by the opponent's\nstones. For example, in the following diagrams the white stones (\"w\")\nor groups of stones will be removed from the board if the Black (\"b\")\nput a stone into the \"х\" point:\n\n                 . . b . .\n    . x w b .    . b w b .    . . x\n    . . b . .    . b w b .    . b w\n    .........    . . x . .\n\n\n# Specifications:\n\n1. Problems are given for a training board with the size of 9×9.\n2. Black moves first.\n3. There are no stones already captured on the board.\n\n**Input:** nine lines which represent the playing board are sent to STDIN.\n\nLines consist of spaces (for vacant points on the board), \"w\" symbols\n(for white stones) and \"b\" symbols (black stones) and end with the new\nline symbol (\"\\n\").\n\n**Output:** сoordinates (column and row numbers separated with a space,\ncounted from one) of points, a move to which results in the capture of\nwhite stones. Results must be sent to STDOUT, one point per line. Results\nmust contain all the possible moves on the board which would lead to the\ncapture of white stones. Points are to be output in the order of their\nposition on the board (left to right, top to bottom).\n\nThe contest is based on regular Perl Golf rules:\n\n1. The winner is the shortest program which passes all the tests.\n2. Shebang must look like #!perl or #!perl -flags. #!perl is not included in the symbol count, but the flags (including \"-\" symbols) are counted.\n3. All remaining symbols, including spaces and new line symbols, are counted.\n4. The program may not use other modules, invoke external programs or access external data sources.\n5. The solution must work correctly in Perl version 5.18.0, without any output to STDERR.\n\nSolutions will be accepted at contest@reg.ru up to 16:00, August 13.\n\nThe winner will be awarded at 16:30, August 13 at the REG.RU stand.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbook%2Fgolf-ye2013","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbook%2Fgolf-ye2013","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbook%2Fgolf-ye2013/lists"}