{"id":19945513,"url":"https://github.com/odilson-dev/connect-four","last_synced_at":"2026-06-11T17:30:58.750Z","repository":{"id":204007862,"uuid":"710080400","full_name":"odilson-dev/connect-four","owner":"odilson-dev","description":"Connect Four is a two-player game where players take turns dropping pieces into a grid","archived":false,"fork":false,"pushed_at":"2024-05-23T02:58:40.000Z","size":165,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T20:29:06.801Z","etag":null,"topics":["connect-four","game","ruby","theodinproject"],"latest_commit_sha":null,"homepage":"https://replit.com/@odilsonjs/Project-Connect-Four?v=1","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/odilson-dev.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":"2023-10-26T01:28:20.000Z","updated_at":"2024-05-23T02:58:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebd0a922-fcd7-4231-a53e-273c68f8eda6","html_url":"https://github.com/odilson-dev/connect-four","commit_stats":null,"previous_names":["odilsonjs/connect-four","odilsoncode/connect-four","odilson-dev/connect-four"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/odilson-dev/connect-four","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odilson-dev%2Fconnect-four","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odilson-dev%2Fconnect-four/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odilson-dev%2Fconnect-four/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odilson-dev%2Fconnect-four/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odilson-dev","download_url":"https://codeload.github.com/odilson-dev/connect-four/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odilson-dev%2Fconnect-four/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34211061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":["connect-four","game","ruby","theodinproject"],"created_at":"2024-11-13T00:25:49.723Z","updated_at":"2026-06-11T17:30:58.729Z","avatar_url":"https://github.com/odilson-dev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TDD Connect Four\n![Images](./Screenshot.png)\n## Introduction\n\nIn this project, i built the classic game Connect Four using Ruby and the Test-Driven Development (TDD) approach. Connect Four is a two-player game where players take turns dropping pieces into a grid, aiming to get four of their pieces in a row, column, or diagonal.\n\n## Project Overview\n\nThe main objective of this project is to implement the Connect Four game in a command-line interface while applying TDD principles. i wrote tests first, then implement the code to pass those tests, ensuring my game is robust and well-tested.\n\n## Features\n\n- **Two-Player Gameplay**: Players alternate turns to drop pieces into the grid.\n- **Win Condition**: The game checks for four consecutive pieces in a row, column, or diagonal to declare a winner.\n- **Command-Line Interface**: The game runs in the terminal, allowing players to input their moves.\n- **Unicode Symbols**: Optionally, use Unicode symbols to represent game pieces for a more visually appealing experience.\n\n## Assignment Steps\n\n1. **Set Up the Project**:\n   - Create a new Ruby project.\n   - Set up RSpec for testing.\n\n2. **Implement TDD**:\n   - Identify the core functionalities of the game (e.g., dropping pieces, checking for a win, switching turns).\n   - Write failing tests for each functionality.\n   - Implement the code to pass the tests.\n   - Refactor the code to improve readability and performance.\n   \n3. **Game Logic**:\n   - Implement the logic for dropping pieces into the grid.\n   - Check for a win condition in rows, columns, and diagonals.\n   - Ensure the game handles edge cases, such as full columns.\n\n4. **Command-Line Interface**:\n   - Create a user-friendly interface for players to input their moves.\n   - Display the game board after each move.\n   - Announce the winner or declare a draw if the board is full.\n\n## How to Run the Project\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/your-username/connect-four.git\n   cd connect-four\n   \n2. **Install Dependancies**:\n   ```bash\n   bundle install\n   \n3. **Run tests**:\n   ```bash\n   rspec\n\n4. **Play the game**:\n   ```bash\n    ruby lib/connect_four.rb\n\n## Learning Objectives\n\n- **Test-Driven Development**: Gain proficiency in TDD by writing tests before implementing functionality.\n- **RSpec**: Learn to write and run tests using the RSpec testing framework.\n- **Ruby Programming**: Enhance your Ruby programming skills by building a complete game.\n- **Problem-Solving**: Develop problem-solving skills by breaking down the game logic into manageable parts and writing tests for each part.\n\n## Conclusion\n\nThis project is an excellent opportunity to practice TDD while building a fun and interactive game. By following the TDD approach, i ensure your code is well-tested and maintainable. I enjoyed the process of building Connect Four and showcasing my skills in Ruby and TDD!\n\n\n\n\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodilson-dev%2Fconnect-four","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodilson-dev%2Fconnect-four","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodilson-dev%2Fconnect-four/lists"}