Living Museum of Learning

Where real moments become exhibits
← Prev Next →
The First 棋谱

The First 棋谱

After rescuing seven apps, Golden Xiangqi writes its first unit test — in Chinese.

Situation

For nearly ten years, Donald had loved watching chess pieces move by themselves: one piece sliding quietly across the board, followed by the gentle “pa, pa, pa...” of each move.

Now Golden Xiangqi was finally stable again after the rescue of all seven published apps. The next idea was simple: add a Game Theater where people could sit back and watch games unfold locally, without another device or a network connection.

The first step was not animation. It was a tiny unit-test target.

A new Golden XiangqiTests target was created — the first unit test target in any of the seven rescued apps. The very first test was almost ridiculously small: playground(). It passed in 0.006 seconds.

Then came game001.txt.
(001顺炮横车破直车弃马局-桔中秘)

Inside Xcode, the file contained nothing but a 13-step Chinese chess record:

1. 炮二平五 炮8平5
2. 马二进三 马8进7
3. 车一进一 车9平8
4. 车一平六 车8进6
5. 车六进七 马2进1
6. 车九进一 炮2进7
7. 炮八进五 马7退8
8. 炮五进四 士6进5
9. 车九平六 将5平6
10. 车六进一 士5退4
11. 车六平四 炮5平6
12. 车四进六 将6平5
13. 炮八平五

The screenshot looked almost like a strange little artifact: an Xcode window, a text file, and row after row of Chinese characters describing pieces moving across an invisible board.

Turning Point

The interesting part was not the game itself.

It was the realization that a complete game could live inside the computer as tiny text.

No board image was necessary. No animation data was necessary. No network connection was necessary.

Just words describing moves.

Emergence

game001.txt became the first seed of Golden Xiangqi's Game Theater.

The file could eventually become a sequence of structured moves. The moves could reconstruct a board. The board could animate the pieces. And the same gentle movement already loved by the player could turn a few lines of Chinese text into a little performance:

pa... pa... pa...

A unit test target had quietly become a laboratory for turning 棋谱 into motion.

Learning

Software does not always need more complexity to create a richer experience.

Sometimes the smallest source material is enough: a text file, a sequence of moves, and an existing board that already knows how to animate a piece.

The rescue of seven old apps was about making software survive.

This new experiment was about giving one of them a new life.

Theme: From text to motion

A tiny Chinese text file can become an animated Chinese chess game.

A unit test provides a safe laboratory: read the 棋谱, parse the moves, reconstruct the position, and feed the moves into the existing board animation.

Learning and creating can begin with something remarkably small. Sometimes a new world starts with a file containing nothing but a few lines of text.