This project implements a matrix generation algorithm in C that embeds a specific string (.NET_CORE) using a Self-Avoiding Random Walk.
-
Grid Initialization: Creates a random
$N \times N$ grid filled with placeholders (#). -
Start: Places the first character
.at a random coordinate. -
Walk:
- Randomly selects a valid neighbor (Up, Down, Left, Right).
- Moves to that neighbor and places the next character.
- Constraint: Cannot move to a cell that is already occupied or out of bounds.
- Retry Mechanism: If the algorithm gets "trapped" (no empty neighbors left but word isn't finished), it resets and tries again.
Target: .NET_CORE
# # O R E
# # C _ #
# # T # #
# . E N #
# # # # #