-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: move models to folder * refactor: rename package to board generator * refactor: rename scripts folder to tool * docs: update readme * chore: update gitignore * Update packages/board_generator/README.md Co-authored-by: Alejandro Santiago <dev@alestiago.com> * refactor: move tool outside of lib --------- Co-authored-by: Alejandro Santiago <dev@alestiago.com>
- Loading branch information
1 parent
f2c359f
commit 3e9507a
Showing
36 changed files
with
72 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ build/ | |
pubspec.lock | ||
|
||
**/**.csv | ||
/**_crossword.txt | ||
/board.txt | ||
**/**_crossword.txt | ||
**/board_**.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Board Generator | ||
|
||
Package used to experiment with the board generation process. | ||
|
||
## 📝 Getting a list of words | ||
|
||
To generate a board, you need a set of words and clues that will be used as an input. Create a `words.csv` file inside the `tool` directory with the following format: | ||
|
||
```none | ||
word,"clue" | ||
flutter,"Open source framework to build multi-platform applications" | ||
firebase,"Mobile and web app development platform by Google" | ||
``` | ||
|
||
If you need some inspiration, you can always [ask gemini](https://g.co/gemini/share/488086554d89) for help. | ||
|
||
## 🧩 Generating a board | ||
|
||
You can either generate a symmetrical crossword or an asymmetrical one by running its corresponding script from the `tool` directory. | ||
|
||
```bash | ||
dart asymmetrical_generation.dart | ||
``` | ||
|
||
You can customize the size of the generated board by updating the `bounds` parameter in the `Crossword`. | ||
|
||
The script will generate two outputs, a visual representation of the crossword in `asymmetrical_crossword.txt` and a csv file (`board_asymmetrical.txt`) with the position, direction, words and clues for the generated board. The csv is ready to be used by the `board_uploader` package to store the new board in firestore. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nerator_playground/lib/src/crossword.dart → ...es/board_generator/lib/src/crossword.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ors/asymmetrical_crossword_generator.dart → ...ors/asymmetrical_crossword_generator.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...b/src/generators/crossword_generator.dart → ...b/src/generators/crossword_generator.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...tors/symmetrical_crossword_generator.dart → ...tors/symmetrical_crossword_generator.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tor_playground/lib/src/models/bounds.dart → ...oard_generator/lib/src/models/bounds.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ground/lib/src/models/character_data.dart → ...erator/lib/src/models/character_data.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../lib/src/horizontal_line_of_symmetry.dart → ...c/models/horizontal_line_of_symmetry.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
...tor_playground/lib/src/models/models.dart → ...oard_generator/lib/src/models/models.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export 'bounds.dart'; | ||
export 'character_data.dart'; | ||
export 'direction.dart'; | ||
export 'horizontal_line_of_symmetry.dart'; | ||
export 'location.dart'; | ||
export 'word_candidate.dart'; | ||
export 'word_pool.dart'; |
4 changes: 2 additions & 2 deletions
4
...ground/lib/src/models/word_candidate.dart → ...erator/lib/src/models/word_candidate.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nerator_playground/lib/src/word_pool.dart → ...d_generator/lib/src/models/word_pool.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...s/board_generator_playground/pubspec.yaml → packages/board_generator/pubspec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...r_playground/test/src/crossword_test.dart → ...rd_generator/test/src/crossword_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...yground/test/src/fixtures/crosswords.dart → ...nerator/test/src/fixtures/crosswords.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...round/test/src/line_of_symmetry_test.dart → ...rator/test/src/line_of_symmetry_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ayground/test/src/models/bounds_test.dart → ...enerator/test/src/models/bounds_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ground/test/src/models/location_test.dart → ...erator/test/src/models/location_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../test/src/models/word_candidate_test.dart → .../test/src/models/word_candidate_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ound/test/src/models/word_entry_test.dart → ...ator/test/src/models/word_entry_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
..._playground/test/src/sort_words_test.dart → ...d_generator/test/src/sort_words_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...r_playground/test/src/word_pool_test.dart → ...rd_generator/test/src/word_pool_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
.../lib/scripts/asymmetrical_generation.dart → ...nerator/tool/asymmetrical_generation.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions
5
...d/lib/scripts/symmetrical_generation.dart → ...enerator/tool/symmetrical_generation.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters