我让 Astra 制作了可玩的四维象棋。
I asked astra to make playable 4D chess

原始链接: https://4d-chess.pages.dev/

这是一个四维国际象棋变体,在 4x4x2x2 的棋盘上进行(文件 a–d,等级 1–4,列 Z=0/1,行 W=0/1)。白棋先行,目标是将死对方的国王。 每位玩家初始拥有一套标准棋子(国王、皇后、两只车、象、马以及四个兵)。移动规则扩展至四个维度:车沿一个轴移动,象沿两个轴移动,皇后沿一到四个轴移动,国王可向任意组合方向移动一步。马按 L 型移动,前提是两步的分量必须在 X 或 Y 轴上。兵向前(Y 轴)移动一格,到达最后一级时升变。 关键限制包括:没有兵的第一步两格移动、王车易位或吃过路兵;棋子(马除外)会被其他棋子阻挡;适用标准的平局规则(逼和、三次重复局面等)。玩家使用键盘控制在四维棋盘上移动,用 Tab/Enter 选择方格,用 Alt + 方向键切换层级。国王不可被吃,一旦将死,游戏立即结束。

```Hacker News 最新 | 往期 | 评论 | 提问 | 展示 | 工作 | 提交 登录 我让 Astra 制作了可玩的 4D 国际象棋 (4d-chess.pages.dev) 9 点 | mikiyas | 1 小时前 | 隐藏 | 往期 | 收藏 | 1 条评论 ljf | 2 分钟前 | [–] 提醒一下自己,我的传统国际象棋下得有多烂,但这真的很有趣,也太烧脑了 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:```
相关文章

原文

Win by checkmating the opposing king. White moves first. Select one of your pieces, then a marked destination. In computer mode, choose White or Black using the side selector.

One space, four coordinates. Each square has an X file, a–d, and a Y rank, 1–4. The two board columns are Z = 0 and Z = 1. The two board rows are W = 1 at the top and W = 0 at the bottom. A square is written as a1 [0,0], with Z and W inside the brackets. Moving to the same square on an adjacent board changes just one axis.

Each side starts with a king, queen, two rooks, bishop, knight, and four pawns. The following movement rules apply equally to X, Y, Z, and W.

Rook

Move any distance along exactly one axis. It can travel within a board or to the same square on another board in the same row or column.

Bishop

Move the same distance along exactly two axes. This includes ordinary diagonals and diagonals that cross between boards.

Queen

Move the same distance along any number of axes, from one to all four. Every changed coordinate must change by the same amount.

King

Move one step along any combination of axes. It may cross both Z and W in a single move, but may never enter an attacked square.

Knight

Jump two steps along one axis and one along a different axis. It jumps over pieces. On this board, the two-step part must use X or Y.

Pawn

Move one empty square along Y. White goes toward rank 4, Black toward rank 1. Capture one Y step forward plus one step along exactly one of X, Z, or W. Reaching the last rank automatically promotes to a queen.

Blocking and check. All pieces except knights are blocked by pieces along their path. You cannot land on a friendly piece or leave your king in check. Checkmate ends the game; the king is never captured.

Pawns have no opening double move. There is no castling or en passant. Stalemate, a third repetition, 100 turns without a pawn move or capture, and two bare kings are draws. Each player's turn counts as one move in the journal.

Try a fourth-axis move. At the start, select White's rook on a1 in the bottom-left board. Move to a1 in the top-left board. X, Y, and Z stay the same; only W changes.

Keyboard. Tab to a square, then press Enter or Space to select a piece or move. Arrow keys move focus within a board. Alt + arrow keys move focus between boards. Escape clears your selection.

联系我们 contact @ memedata.com