https://github.com/z0rr0/go_metagramma
go_metagramma
https://github.com/z0rr0/go_metagramma
Last synced: 5 months ago
JSON representation
go_metagramma
- Host: GitHub
- URL: https://github.com/z0rr0/go_metagramma
- Owner: z0rr0
- License: gpl-3.0
- Created: 2017-10-11T19:47:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-22T19:31:01.000Z (over 8 years ago)
- Last Synced: 2025-10-13T13:12:21.165Z (9 months ago)
- Language: Go
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoMetagramma
It is a [metagramma](https://ru.wikipedia.org/wiki/%D0%9C%D0%B5%D1%82%D0%B0%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D1%8B) game - find the shortest way from a word to other one changing only one symbol.
1. Prepare "database" `dict.json` using file `dict.txt` with words list.
```sh
./go_metagramma -i dict.txt -o dict.json
```
2. Find a way:
```sh
./go_metagramma -d dict.json -f стол -t хлеб
162164 items are read from dict.json
0: стол
1: стой
2: слой
3: злой
4: злей
5: влей
6: влев
7: хлев
8: хлеб
duration 575.586798ms
```
## Build
It was checked on Go 1.9
```sh
go install github.com/z0rr0/go_metagramma
```
Run test:
```sh
go test -race -v -cover -coverprofile=coverage.out -trace trace.out github.com/z0rr0/go_metagramma
go tool cover -html=coverage.out
```