Commit Graph
95 Commits
Author SHA1 Message Date
cblanken c0fe222832 Add tests for parsing board input files 2023-05-30 19:35:23 -04:00
cblanken 6771ec9205 Add mypy fix some typing errors 2023-05-29 21:25:38 -04:00
cblanken e1981c44de Use pathlib to handle paths instead of os.path
- Replaces all instances of os.path objects with pathlib.Path
2023-05-26 11:50:30 -04:00
cblanken 02bb7c4262 Replace log format strings with lazy formatting
- Pylint recommends to use lazy formatting (%s) for logging functions
2023-05-26 11:27:47 -04:00
cblanken da00afb395 Add JSON output option 2023-05-26 11:27:47 -04:00
cblanken afaa378131 Add clean text output option
- Output valid words for the provided board in a normal text format, one word per line
    - Select between just word output and word+path output for easier post-processing
    - Also includes sort and de-duplication options
2023-05-26 11:26:06 -04:00
cblanken daebee948a Add pylint to dev depencies 2023-05-24 22:18:50 -04:00
cblanken 2bc9d9fb9e Add argument parsing to main module 2023-05-24 19:20:30 -04:00
cblanken 7500720992 Refactor 4x4 board test to use pytest fixtures
- Update missing symoblic link to boggler src files to access wordlists
2023-05-24 17:37:51 -04:00
cblanken d81f5e28cc Replace unittest with pytest
- Pytest requires test modules to start with the "test_" prefix. The new
test_solve_4x4_board.py module replaces the functional_tests.py module
2023-05-24 16:18:40 -04:00
cblanken a0d60d280c Add poetry script to run main boggler script
- Also correct import for boggler_utils to be relative in __main__.py so it can be run
as module with `python -m boggler`
2023-05-24 12:15:18 -04:00
cblanken ac58828521 Move source files for consistency with Poetry
- By default Poetry build packages into "./packagename/packagename" instead of
"./packagename/src/packagename", this commit reflects that structure even though
poetry _could_ build normally from the original structure
2023-05-24 12:10:32 -04:00
cblanken 59c5beb491 Update project config to use poetry 2023-05-24 11:00:52 -04:00
cblanken 49cf552cc1 Merge branch 'main' into dev 2023-04-24 20:47:41 -04:00
cblanken f0cee00bef Update README.md 2023-04-24 19:25:18 -04:00
cblankenandGitHub 843e167bf4 Update README.md 2023-03-30 19:08:47 -04:00
cblanken 1a1f5acb17 Fix memory warnings/errors/leaks per valgrind 2023-03-30 12:06:13 -04:00
cblanken 2f795be626 Add debug information to compilation flags 2023-03-30 12:05:23 -04:00
cblanken 6f4d4a69a0 Add WordTree data structure and helper functions 2023-03-28 19:05:08 -04:00
cblanken 82991e96e7 Add BoardCell struct 2023-03-27 16:32:11 -04:00
cblanken 1386e1cace Add Makefile 2023-03-24 18:27:44 -04:00
cblanken 8c9ed00826 Initial C implementation commit with Board struct 2023-03-24 18:25:56 -04:00
cblanken c09dce4bd6 Add basic solved board tests 2023-03-23 14:19:28 -04:00
cblanken a37548a4ee Merge branch 'main' into dev 2023-03-23 12:46:02 -04:00
cblanken 1dc118e953 Fix boggle tree missing multi-letter nodes
The BoggleTree object when inserting nodes did not properly check for nodes
with values of more than 1 letter. Therefore, any words with "qu" after the
root would not be included in the solved board. As of now, only nodes with
a maximum of 2 letters are accounted for, 3+ letter nodes won't be checked.
2023-03-23 12:42:40 -04:00
cblanken 6d3a58595c Replace print(s) with logging functions 2023-03-22 16:25:37 -04:00
cblanken 8b9dc89420 Update README with build instructions 2023-03-13 21:53:03 -04:00
cblanken a80111072f Bump release version v2.0.1 2022-12-30 20:55:44 -05:00
cblanken fa01d442a5 Fix bug in board randomizer
- The board randomizer did not account for dice files that don't contain an exact integer squared number of dice. For example the 5x5 dice file contains 26 possible dice since 1 extra die is provided.
- The fix takes the square root of the number of dice and takes the floor of that number as the total number of dice to choose.
2022-12-30 19:54:00 -05:00
cblanken 733c1474b0 Add 5x5 dice file 2022-12-30 19:51:41 -05:00
cblanken 54f79c0afe Remove dead code from boggler.py 2022-11-16 20:37:30 -05:00
cblanken 9f364ee90e Remove old dictionary word prefix lists 2022-11-16 20:36:55 -05:00
cblanken e219954ba6 Add function to flatten boggle board results into 1D list 2022-10-10 12:00:42 -04:00
cblanken f4accfe959 Update wordlist splitting script
- use ripgrep to exclude proper nouns (with capitals) output only the
  capture group
2022-09-28 13:01:39 -04:00
cblanken bc70b88bf7 Bump version 2.0.0 v2.0.0 2022-09-26 11:44:51 -04:00
cblanken 21aab46b96 Refactor board_randomizer
- Make file read separate and return "dice" or a list of strings from
  dice handling functions for use in downstream programs
2022-09-26 11:40:36 -04:00
cblanken f18c30cb60 Rename Super Big Boggle dice file 2022-09-23 10:20:48 -04:00
cblanken da915b723c Update wordlist splitting script
- Force lowercase on split
- Only match single (non compound) words
- Don't match punctuation
- Sort and uniquify
2022-09-23 10:20:48 -04:00
cblanken d5a102713d Fix die letters for 'New Boggle' dice 2022-09-23 10:20:38 -04:00
cblanken c488263eea Bump version and update license v1.0.2 2022-09-21 10:15:14 -04:00
cblanken fe1f1c2b97 Fix MAX_WORD_LENGTH parsing 2022-09-21 10:04:02 -04:00
cblanken d2584686a3 Fix max word length
- Previously the max word length parameter was checking the tree depths
  instead of the length of the word
- This fix acounts for multi-letter blocks like 'Qu', 'Tr' etc.
2022-09-21 09:45:09 -04:00
cblanken 8f75604d15 Handle blocks with empty strings and non-existant wordlists 2022-09-20 22:45:57 -04:00
cblanken 96da732dd9 Update board_randomizer module
- Fix typo: randimizer to randomizer
- Add module function to get direct 2d array of board values
2022-09-20 15:58:26 -04:00
cblanken ec53042d18 Update and move word splitting script 2022-09-20 13:21:57 -04:00
cblankenandGitHub 5c18a4aebf Update README.md 2022-09-15 14:06:55 -04:00
cblanken b197253d86 Add 9x9 dice file 2022-09-15 13:44:14 -04:00
cblanken 67f8c439b0 Update release version 2022-09-15 13:44:14 -04:00
cblanken 8c41ad212d Add missing __init__.py for PyPI package 2022-09-15 13:44:14 -04:00
cblanken 94800909b4 Update project version number 2022-09-15 13:44:14 -04:00