{"id":19207388,"url":"https://github.com/aaisha-nexus/connect4game","last_synced_at":"2025-08-21T15:38:31.098Z","repository":{"id":248707010,"uuid":"828966381","full_name":"Aaisha-Nexus/Connect4Game","owner":"Aaisha-Nexus","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-16T13:52:18.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T14:45:36.181Z","etag":null,"topics":["connect-four","cpp","functions","game"],"latest_commit_sha":null,"homepage":"","language":"C++","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/Aaisha-Nexus.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":"2024-07-15T13:36:40.000Z","updated_at":"2024-07-21T18:13:45.000Z","dependencies_parsed_at":"2024-07-16T17:08:36.826Z","dependency_job_id":null,"html_url":"https://github.com/Aaisha-Nexus/Connect4Game","commit_stats":null,"previous_names":["aaisha-nexus/connect4game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aaisha-Nexus/Connect4Game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaisha-Nexus%2FConnect4Game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaisha-Nexus%2FConnect4Game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaisha-Nexus%2FConnect4Game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaisha-Nexus%2FConnect4Game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aaisha-Nexus","download_url":"https://codeload.github.com/Aaisha-Nexus/Connect4Game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaisha-Nexus%2FConnect4Game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271500934,"owners_count":24770517,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"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","cpp","functions","game"],"created_at":"2024-11-09T13:19:46.223Z","updated_at":"2025-08-21T15:38:31.061Z","avatar_url":"https://github.com/Aaisha-Nexus.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connect Four Game\n\nConnect Four is a classic two-player game where each player chooses a color, either **'R' (Red)** or **'Y' (Yellow)**, and takes turns dropping colored discs into a 6x7 grid. The objective is to be the first to form a vertical, horizontal, or diagonal line of four discs of the same color.\n\n## Description\n\nConnect Four is a strategic game that challenges players to outwit their opponent by forming a line of four discs while blocking the opponent's attempts to do the same. The game ends when one player achieves this goal, or the grid is completely filled without a winner, resulting in a draw.\n\n## How to Play\n\n### Game Initialization\n\n- The game starts with an empty 6x7 grid, represented by dashes (`-`).\n\n### Turns\n\n- Players take turns to drop one of their colored discs into any of the 7 columns.\n- The disc falls to the lowest available slot in the selected column.\n\n### Winning Condition\n\nA player wins by connecting four of their discs in one of the following ways:\n\n- **Vertical**: Four discs in a column.\n- **Horizontal**: Four discs in a row.\n- **Diagonal (Left to Right)**: Four discs in a downward slope from left to right.\n- **Diagonal (Right to Left)**: Four discs in a downward slope from right to left.\n\n### End of Game\n\n- The game ends immediately when a player forms a line of four discs, and that player is declared the winner.\n- If the grid is completely filled without any player forming a line of four discs, the game ends in a draw.\n\n## Controls\n\n- Players use the keyboard to select the column (0-6) where they want to drop their disc.\n\n## Functions\n\n- **`bool isFull(int col)`**: Checks if a specific column is full.\n- **`bool dropdisk(int col, char player)`**: Drops a disc for the given player into the specified column.\n- **`void gamelook()`**: Displays the current state of the grid.\n- **`bool checkWin(char player)`**: Checks if the given player has won the game by forming a line of four discs.\n\n## Example Gameplay\nWELCOME TO CONNECT4 GAME!\nDrop a R disk at column (0-6): 3\n|---R---|\n|-------|\n|-------|\n|-------|\n|-------|\n|-------|\n\nDrop a Y disk at column (0-6): 4\n|---R-Y-|\n|-------|\n|-------|\n|-------|\n|-------|\n|-------|\n\n...\n\nPlayer R won the game!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaisha-nexus%2Fconnect4game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaisha-nexus%2Fconnect4game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaisha-nexus%2Fconnect4game/lists"}