Skip to content

About

1 KiB offline Dots and Boxes Game against a CPU in one HTML file

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

cheeseByte

A complete Dots and Boxes game with a CPU — packed into 1,005 bytes.

Normal CPU · 😈 Hard mode · 5 × 5 board · Offline · One HTML file

Download the game · Readable edition · Golfed source

A new cheeseByte round A finished cheeseByte game

A lot of game in 1 KB

  • Two CPU modes. Normal mode mixes strategy with randomness; 😈 mode always chooses the best move found by the built-in heuristic.
  • Polished game feel. The CPU pauses before moving, free lines preview on hover, and the dark canvas keeps gold and red boxes easy to read.
  • A fresh opening. Every round begins with one random neutral line.
  • Zero setup. Download one HTML file, open it, and play offline.

Play

You are gold; the CPU is red. Click between adjacent dots. Closing a box scores a point and gives you another turn.

Toggle 😈 for hard mode. Press ⟳ for a new round. The higher score wins.

Code comparison

Version Purpose Size
Readable edition Formatted code, descriptive names, and comments 6,730 B
Golfed source The same game optimized by hand 1,062 B
RegPack release The final playable file 1,005 B

The final file is 5,725 bytes smaller than the readable edition — an 85.1% reduction — while keeping the same game behavior. At 1,005 bytes, it leaves 19 bytes below the 1 KiB limit.

The golfed source is packed with RegPack 5.0.1. All three versions run without dependencies.

About

1 KiB offline Dots and Boxes Game against a CPU in one HTML file

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages