{"slug": "zcode", "title": "ZCode", "summary": "A developer built a standalone browser-based Gomoku game from scratch after finding an empty repository. The 15x15 board game features a heuristic AI opponent, win detection in all directions, and a local-only design with no network dependencies.", "body_md": "I’m going to inspect the current Gomoku project structure first, then I’ll identify what already exists for board state, rendering, and game flow before wiring in AI and win detection.\n\n`pwd`\n\nThe repository looks either empty or nearly empty. I’m checking the actual directory contents now and confirming whether there’s an existing app to extend or whether I should build the game from scratch.\n\n`git status --short`\n\nFailed\n\n```\ngit status --short\n2026-04-19 17:10:16.280 xcodebuild[60663:50240053] DVTFilePathFSEvents: Failed to start fs event stream.\ngit: warning: confstr() failed with code 5: couldn't get path of DARWIN_USER_TEMP_DIR; using /tmp instead\nfatal: not a git repository (or any of the parent directories): .git\n```\n\nThere isn’t an existing app here, so I’m building a self-contained implementation from scratch. I’m checking whether there are any local project conventions to respect, then I’ll add a browser-based Gomoku with a heuristic AI, turn handling, and explicit five-in-a-row detection.\n\nThe full UI and core logic are in place. I’m verifying the JavaScript parses cleanly and reviewing the move-scoring logic for edge cases like first-move response, draw handling, and long-line wins.\n\n`node --check app.js`\n\n```\nnode --check app.js\n```\n\nNo output.\n\nI found one avoidable dependency: the page was pulling a web font. I’m removing that so the game stays fully local and works by opening `index.html`\n\nwith no network requirement.\n\nBuilt a standalone browser Gomoku game in , , and . It renders a 15x15 board, lets the player place black stones, detects wins in all four directions, highlights the winning line, tracks turns and move count, and supports restarting the match.\n\nThe AI is heuristic rather than random. It searches nearby candidate moves, scores offensive patterns for itself, scores defensive blocks against the player, adds center preference, and chooses the strongest move. There's also an optional “AI focus area” overlay so you can see the strongest candidate points it considered.\n\nVerification: `node --check app.js`\n\npassed. I did not run an interactive browser session here, so the remaining step is to open in a browser and play.", "url": "https://wpnews.pro/news/zcode", "canonical_source": "https://zcode.z.ai/en", "published_at": "2026-06-17 14:42:11+00:00", "updated_at": "2026-06-17 14:52:48.166423+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-products", "developer-tools"], "entities": [], "alternates": {"html": "https://wpnews.pro/news/zcode", "markdown": "https://wpnews.pro/news/zcode.md", "text": "https://wpnews.pro/news/zcode.txt", "jsonld": "https://wpnews.pro/news/zcode.jsonld"}}