Skip to content

Commit 315b4ac

Browse files
danieldownesclaude
andcommitted
Rename doc to docs for GitHub Pages deployment
- Rename doc/ folder to docs/ to support GitHub Pages deploy from /docs - Update all references in README.md and GraphTests.cs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent df54a64 commit 315b4ac

13 files changed

Lines changed: 13 additions & 13 deletions

Code/GraphTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ public void GenerateSolutionsHtml()
536536
sb.AppendLine("</body>");
537537
sb.AppendLine("</html>");
538538

539-
string outPath = Path.GetFullPath(Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "..", "..", "doc", "solutions.html"));
539+
string outPath = Path.GetFullPath(Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "..", "..", "docs", "solutions.html"));
540540
File.WriteAllText(outPath, sb.ToString());
541541
TestContext.WriteLine($"Solutions written to {outPath}");
542542
}

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Block Problem
22

3-
**[Play the Game](https://danieldownes.github.io/BlockProblemGame/doc/game.html)** | [Block Reference](https://danieldownes.github.io/BlockProblemGame/doc/blocks.html) | [Solutions](https://danieldownes.github.io/BlockProblemGame/doc/solutions.html)
3+
**[Play the Game](https://danieldownes.github.io/BlockProblemGame/docs/game.html)** | [Block Reference](https://danieldownes.github.io/BlockProblemGame/docs/blocks.html) | [Solutions](https://danieldownes.github.io/BlockProblemGame/docs/solutions.html)
44

5-
<img src="./doc/photo.jpg">
5+
<img src="./docs/photo.jpg">
66

77
In the mid 90s, I was gifted a wooden puzzle game that contains a grid array of 4x4 blocks. I've never since seen this puzzle game anywhere else.
88

@@ -11,11 +11,11 @@ Based on a 4x4 grid of wooden blocks, each block has a graphic on its top-side.
1111

1212
## Visual Basic Implementation
1313

14-
As per the [History.txt](./doc/History.txt) file, in 2001, I implemented the blocks including data to hold the 4 colours and set the diamond flag.
14+
As per the [History.txt](./docs/History.txt) file, in 2001, I implemented the blocks including data to hold the 4 colours and set the diamond flag.
1515

1616
The UI allows the user to swap two blocks with two clicks. And also rotate a block with a right-click.
1717

18-
<img src="./doc/vb6.png" width="40%">
18+
<img src="./docs/vb6.png" width="40%">
1919

2020
The intention was to also include a brute force solving algorithm, however this was never started.
2121

@@ -46,7 +46,7 @@ There are different types of graphs:
4646
- **Directed graph** — edges have a direction (A to B is not the same as B to A).
4747
- In our solver, we use **directed edges** because "Block A can sit to the LEFT of Block B" is different from "Block A can sit ABOVE Block B".
4848

49-
<img src="./doc/diagram-graph-basics.svg" width="100%">
49+
<img src="./docs/diagram-graph-basics.svg" width="100%">
5050

5151
### The Puzzle as a Graph Problem
5252

@@ -56,7 +56,7 @@ Instead, we use a **compatibility graph** to dramatically reduce the search spac
5656

5757
Each block has four coloured edges and an optional centre diamond:
5858

59-
<img src="./doc/diagram-block-anatomy.svg" width="100%">
59+
<img src="./docs/diagram-block-anatomy.svg" width="100%">
6060

6161
### Step 1: Build the Compatibility Graph
6262

@@ -71,7 +71,7 @@ For example, if Block 3 at rotation 0 has a red right edge, and Block 7 at rotat
7171

7272
This pre-computation is fast (comparing all 64 x 64 pairs) and creates a lookup table that the solver queries thousands of times during the search.
7373

74-
<img src="./doc/diagram-compatibility.svg" width="100%">
74+
<img src="./docs/diagram-compatibility.svg" width="100%">
7575

7676
### Step 2: Constraint Propagation
7777

@@ -85,7 +85,7 @@ The solver fills the grid left-to-right, top-to-bottom. At each position, it onl
8585

8686
This is where the graph structure pays off. Instead of checking "does this block work here?" by comparing colours each time, we simply ask "is there an edge in the compatibility graph between what's already placed and what I'm trying to place?" — a fast set lookup.
8787

88-
<img src="./doc/diagram-backtracking.svg" width="100%">
88+
<img src="./docs/diagram-backtracking.svg" width="100%">
8989

9090
### Step 3: Forward Checking
9191

@@ -101,7 +101,7 @@ Level 2 adds the rule that no two adjacent blocks can both have diamonds. The so
101101

102102
Since 8 of the 16 blocks have diamonds and 8 don't, and no two diamond blocks can touch, diamonds must occupy one "colour" of a checkerboard pattern (like bishops on a chess board). There are only two possible parities — diamonds on even (r+c)%2 positions or odd positions. The solver tries both, pre-filtering each position's domain to only include diamond or non-diamond blocks as appropriate. This halves the search space before backtracking even begins.
103103

104-
<img src="./doc/diagram-checkerboard.svg" width="100%">
104+
<img src="./docs/diagram-checkerboard.svg" width="100%">
105105

106106
### Why This Isn't Brute Force
107107

@@ -124,6 +124,6 @@ No two blocks containing a diamond should touch, i.e., blocks with diamonds shou
124124

125125
## Play and View
126126

127-
- [Interactive Game](https://danieldownes.github.io/BlockProblemGame/doc/game.html) — drag and drop blocks onto the board, rotate pieces, and use hints
128-
- [Block Reference](https://danieldownes.github.io/BlockProblemGame/doc/blocks.html) — visual reference of all 16 blocks
129-
- [Solutions](https://danieldownes.github.io/BlockProblemGame/doc/solutions.html) — solved grids for Level 1 and Level 2
127+
- [Interactive Game](https://danieldownes.github.io/BlockProblemGame/docs/game.html) — drag and drop blocks onto the board, rotate pieces, and use hints
128+
- [Block Reference](https://danieldownes.github.io/BlockProblemGame/docs/blocks.html) — visual reference of all 16 blocks
129+
- [Solutions](https://danieldownes.github.io/BlockProblemGame/docs/solutions.html) — solved grids for Level 1 and Level 2
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)