{"id":22654482,"url":"https://github.com/andrewjh271/connect_four","last_synced_at":"2025-03-29T07:43:40.856Z","repository":{"id":139233267,"uuid":"271475660","full_name":"andrewjh271/connect_four","owner":"andrewjh271","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-14T02:08:01.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T21:37:59.871Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/andrewjh271.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-06-11T07:02:26.000Z","updated_at":"2020-06-14T02:08:03.000Z","dependencies_parsed_at":"2024-04-19T04:01:16.577Z","dependency_job_id":null,"html_url":"https://github.com/andrewjh271/connect_four","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewjh271%2Fconnect_four","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewjh271%2Fconnect_four/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewjh271%2Fconnect_four/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewjh271%2Fconnect_four/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewjh271","download_url":"https://codeload.github.com/andrewjh271/connect_four/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246156029,"owners_count":20732359,"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-12-09T09:50:51.382Z","updated_at":"2025-03-29T07:43:40.836Z","avatar_url":"https://github.com/andrewjh271.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connect Four\n\nCreated as part of The Odin Project Curriculum. View on [Repl.it](https://repl.it/@andrewjh271/connectfour#README.md)\n\n### Functionality\n\nImplementation of the game [Connect Four](https://en.wikipedia.org/wiki/Connect_Four). Game ends when a player gets four in a row, or when all spaces are filled.\n\n### Thoughts\n\nThe focus of this project was to write it using Test Driven Development. I found starting with tests somewhat useful for my `Board` class, which is the only class to contain methods with much logic. In starting with tests, I was more inclined to try to make my methods limited in their scope, which I found beneficial. It is also nice being able to refactor and quickly confirm that the class still functions correctly.\n\nThere wasn't much to test for with the `Player` and `Game` classes — mostly terminal output and user input. These were both difficult and not particularly useful to test.\n\nIn my `game_spec.rb` file I originally set the `subject` to an instance of `Game`, and mocked it to receive `gets`, but this created problems when I tried to run all rspec files as a group, rather than just the one file. I know the issue relates to Kernel reading files from command line arguments, but I don't quite understand why Kernel was reached in the first place, since I was trying to mock the method. I eventually settled on using `allow_any_instance_of(Kernel).to receive(:gets)`, but this created new problems with the output. This was related to when `subject` was instantiated, but even knowing that I couldn't get it to behave correctly. I left a number of commented notes in this spec file, because I want to remember some of my troubleshooting process.\n\n-Andrew Hayhurst","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjh271%2Fconnect_four","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjh271%2Fconnect_four","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjh271%2Fconnect_four/lists"}