Skip to content

Commit

Permalink
Merge pull request #53 from srajan-kiyotaka/sracho
Browse files Browse the repository at this point in the history
fix the grid world display size issue.
  • Loading branch information
srajan-kiyotaka authored Jun 17, 2024
2 parents 7e00d86 + 652948a commit 86f38c1
Show file tree
Hide file tree
Showing 18 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
venv
envs
*.ipynb
traverseCraft/__pycache__
*/*/__pycache__
src/traverseCraft/__pycache__
tests/__pycache__
test_grid.py
test_tree.py
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "traverseCraft"
version = "0.5.2"
version = "0.6.0"
authors = [
{name = "Srajan Chourasia", email = "[email protected]"},
{name = "Varun Patrikar", email = "[email protected]"},
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='TraverseCraft',
version='0.5.0',
version='0.6.0',
author='Srajan Chourasia, Varun Patrikar',
author_email='[email protected], [email protected]',
maintainer='Srajan Chourasia, Varun Patrikar',
Expand Down
Binary file removed src/traverseCraft/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file removed src/traverseCraft/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file removed src/traverseCraft/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed src/traverseCraft/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed src/traverseCraft/__pycache__/agent.cpython-36.pyc
Binary file not shown.
Binary file removed src/traverseCraft/__pycache__/agent.cpython-37.pyc
Binary file not shown.
Binary file removed src/traverseCraft/__pycache__/agent.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/traverseCraft/__pycache__/world.cpython-36.pyc
Binary file not shown.
Binary file removed src/traverseCraft/__pycache__/world.cpython-37.pyc
Binary file not shown.
Binary file removed src/traverseCraft/__pycache__/world.cpython-38.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions src/traverseCraft/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def __init__(self, worldName:str, rows:int, cols:int, cellSize:int=10, pathColor
self._goalCells = None

# ~~~~~ Window Attributes ~~~~~ #
self._windowHeight = ((self._rows + 2) * (self._cellSize + 2*self._cellPadding))
self._windowWidth = (int)(self._cols + 0.75) * (self._cellSize + 2*self._cellPadding)
self._windowHeight = (int)((self._rows + 0.5) * (self._cellSize + 2*self._cellPadding)) + 45
self._windowWidth = max((int)((self._cols + 0.5) * (self._cellSize + 2*self._cellPadding)), 200)

# ~~~~~ Button Attributes ~~~~~ #
self._buttonBgColor = buttonBgColor
Expand Down Expand Up @@ -188,7 +188,7 @@ def aboutWorld(self):
about.add_row(["Columns", self._cols])
about.add_row(["Cell Size", self._cellSize])
about.add_row(["Cell Padding", self._cellPadding])
about.add_row(["Window Size", f"{self._windowWidth}x{self._windowHeight}"])
about.add_row(["Window Size", f"{self._windowHeight}x{self._windowWidth}"])
about.add_row(["Path Color", self._pathColor])
about.add_row(["Block Color", self._blockColor])
about.add_row(["Goal Color", self._goalColor])
Expand Down

0 comments on commit 86f38c1

Please sign in to comment.