go get github.com/eloonstra/go-little-drunken-bishop
There's a great document of Dirk Loss that explains in detail how the art is generated. I definitely recommend checking it out.
Import the library.
import "github.com/eloonstra/go-little-drunken-bishop/pkg/drunkenbishop"
Then call the GenerateRandomArt
function as follows:
drunkenbishop.GenerateRandomArt(17, 9, []byte("test"), true, "test title")
And that's it! The result is a string containing the art.
An example of the output of the GenerateRandomArt
function with "DrunkenBishop" as bytes and as title:
+-[DrunkenBishop]-+
| . o.. . |
| + o o |
| . @ E |
| . = @ |
| S + = |
| . + |
| |
| |
| |
+-----------------+
This project is licensed under the MIT license.
All contributions are welcome. Feel free to open an issue or pull request.
The project is mainly finished; only the main function is not finished yet, so it's impossible to generate art from the command line.