René's URL Explorer Experiment


Title: [FEATURE REQUEST] Add TicTacToe and Connect Four games to puzzlesandgames package · Issue #7772 · TheAlgorithms/Java · GitHub

Open Graph Title: [FEATURE REQUEST] Add TicTacToe and Connect Four games to puzzlesandgames package · Issue #7772 · TheAlgorithms/Java

X Title: [FEATURE REQUEST] Add TicTacToe and Connect Four games to puzzlesandgames package · Issue #7772 · TheAlgorithms/Java

Description: Title Add TicTacToe and Connect Four implementations with game logic and optimal move finder Description I would like to propose adding two classic board games, TicTacToe and Connect Four, to the puzzlesandgames package. Both implementat...

Open Graph Description: Title Add TicTacToe and Connect Four implementations with game logic and optimal move finder Description I would like to propose adding two classic board games, TicTacToe and Connect Four, to the p...

X Description: Title Add TicTacToe and Connect Four implementations with game logic and optimal move finder Description I would like to propose adding two classic board games, TicTacToe and Connect Four, to the p...

Opengraph URL: https://github.com/TheAlgorithms/Java/issues/7772

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEATURE REQUEST] Add TicTacToe and Connect Four games to puzzlesandgames package","articleBody":"### Title\nAdd TicTacToe and Connect Four implementations with game logic and optimal move finder\n\n### Description\n\nI would like to propose adding two classic board games, **TicTacToe** and **Connect Four**, to the `puzzlesandgames` package.\n\nBoth implementations will provide core game functionality, including board management, player turn handling, move validation, win detection, and game-over conditions.\n\n### Motivation\n\nThese additions would expand the existing puzzles and games collection with interactive game-logic implementations while demonstrating 2D array manipulation, recursion, game-state management, adversarial search, and efficient win detection.\n\n### Issue details\n\n### Proposed Implementations\n\n#### 1. TicTacToe\n\nA two-player TicTacToe implementation featuring:\n\n- Standard 3×3 game board.\n- Two players using `X` and `O`, with `X` moving first.\n- Move placement with validation for occupied and out-of-range cells.\n- Automatic player turn switching.\n- Detection of horizontal, vertical, and diagonal wins.\n- Draw and game-over detection.\n- Retrieval of the current board, winner, and active player.\n- Defensive copying when returning the board.\n- An optimal move finder using the **Negamax form of the Minimax algorithm**, ensuring perfect-play decisions.\n\n#### 2. Connect Four\n\nA two-player Connect Four implementation featuring:\n\n- Standard 6×7 game board.\n- Two players using Red (`R`) and Yellow (`Y`), with Red moving first.\n- Disc placement using column selection, with discs falling to the lowest available position.\n- Validation for invalid and full columns.\n- Automatic player turn switching.\n- Detection of horizontal, vertical, and both diagonal winning combinations.\n- Draw and game-over detection.\n- Retrieval of the current board, winner, and active player.\n- Defensive copying when returning the board.\n- Efficient win detection by examining the four directions through the last placed disc.\n\n### Unit Tests\n\nBoth implementations will include JUnit 5 test classes covering:\n\n- Initial board and player state.\n- Valid and invalid moves.\n- Player turn switching.\n- Horizontal, vertical, and diagonal wins.\n- Draw conditions.\n- Game-over handling.\n- Board defensive copying.\n- Game-specific functionality, including optimal move selection in TicTacToe and disc stacking in Connect Four.\n\n### Proposed File Structure\n\n`src/main/java/com/thealgorithms/puzzlesandgames/`\n- `TicTacToe.java`\n- `ConnectFour.java`\n\n`src/test/java/com/thealgorithms/puzzlesandgames/`\n- `TicTacToeTest.java`\n- `ConnectFourTest.java`\n\n\n### Additional Information\n\n_No response_","author":{"url":"https://github.com/aniketShukla1605","@type":"Person","name":"aniketShukla1605"},"datePublished":"2026-11-23T05:40:18Z","url":"https://github.com/TheAlgorithms/Java/issues/7772"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:eafa9866-d425-3716-7e86-69da31198cd3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8B68:2490A6:5006C5:6D1BF3:6B06075E
html-safe-nonce2329134c826ca58923d14a8797607d40a5971865cccd8da35ebdd025c2b09353
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjY4OjI0OTBBNjo1MDA2QzU6NkQxQkYzOjZCMDYwNzVFIiwidmlzaXRvcl9pZCI6IjEwNjU1Njc1OTI0OTgyMDI0NjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac485f7798e9067a8df34b4694500f81a817ef3448deec9e88dddff8ff216540e2
hovercard-subject-tagissue:6553064841
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TheAlgorithms/Java/7772/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c7115500bb91d909d526e00068456964e98751188c2374fe7f6c6ea4a446ad70/TheAlgorithms/Java/issues/7772
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c7115500bb91d909d526e00068456964e98751188c2374fe7f6c6ea4a446ad70/TheAlgorithms/Java/issues/7772
og:image:altTitle Add TicTacToe and Connect Four implementations with game logic and optimal move finder Description I would like to propose adding two classic board games, TicTacToe and Connect Four, to the p...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameaniketShukla1605
hostnamegithub.com
expected-hostnamegithub.com
None47127d2f2009e000f3401193f8b4163109ac669adad0804de1ee0e6333ca7b9e
turbo-cache-controlno-preview
go-importgithub.com/TheAlgorithms/Java git https://github.com/TheAlgorithms/Java.git
octolytics-dimension-user_id20487725
octolytics-dimension-user_loginTheAlgorithms
octolytics-dimension-repository_id63477660
octolytics-dimension-repository_nwoTheAlgorithms/Java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id63477660
octolytics-dimension-repository_network_root_nwoTheAlgorithms/Java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0760ea46a027ba5099cdef7abd54f27865eb4f44
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/TheAlgorithms/Java/issues/7772#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTheAlgorithms%2FJava%2Fissues%2F7772
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTheAlgorithms%2FJava%2Fissues%2F7772
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=TheAlgorithms%2FJava
Reloadhttps://github.com/TheAlgorithms/Java/issues/7772
Reloadhttps://github.com/TheAlgorithms/Java/issues/7772
Reloadhttps://github.com/TheAlgorithms/Java/issues/7772
TheAlgorithmshttps://github.com/TheAlgorithms
Javahttps://github.com/TheAlgorithms/Java
Codehttps://github.com/TheAlgorithms/Java
Issues6 (6)https://github.com/TheAlgorithms/Java/issues
Pull requests24 (24)https://github.com/TheAlgorithms/Java/pulls
Actionshttps://github.com/TheAlgorithms/Java/actions
Security and qualityhttps://github.com/TheAlgorithms/Java/security
Insightshttps://github.com/TheAlgorithms/Java/insights
https://github.com/TheAlgorithms/Java
New issuehttps://github.com/login?return_to=https://github.com/TheAlgorithms/Java/issues/7772
New issuehttps://github.com/login?return_to=https://github.com/TheAlgorithms/Java/issues/7772
#7773https://github.com/TheAlgorithms/Java/pull/7773
[FEATURE REQUEST] Add TicTacToe and Connect Four games to puzzlesandgames packagehttps://github.com/TheAlgorithms/Java/issues/7772#top
#7773https://github.com/TheAlgorithms/Java/pull/7773
enhancementhttps://github.com/TheAlgorithms/Java/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/aniketShukla1605
aniketShukla1605https://github.com/aniketShukla1605
on Nov 23, 2026https://github.com/TheAlgorithms/Java/issues/7772#issue-6553064841
aniketShukla1605https://github.com/aniketShukla1605
enhancementhttps://github.com/TheAlgorithms/Java/issues?q=state%3Aopen%20label%3A%22enhancement%22
on Nov 23, 2026https://github.com/TheAlgorithms/Java/issues/7772#event-36973719445
aniketShukla1605https://github.com/aniketShukla1605
on Nov 23, 2026https://github.com/TheAlgorithms/Java/issues/7772#event-36975904992
aniketShukla1605https://github.com/aniketShukla1605
on Nov 23, 2026https://github.com/TheAlgorithms/Java/issues/7772#event-36975923604
Sign up for freehttps://github.com/signup?return_to=https://github.com/TheAlgorithms/Java/issues/7772
Sign in to commenthttps://github.com/login?return_to=https://github.com/TheAlgorithms/Java/issues/7772
enhancementhttps://github.com/TheAlgorithms/Java/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.