From c2d9585e9265c9da99b56863cd60e86ab07ed894 Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Wed, 15 Nov 2023 22:07:29 +0100 Subject: [PATCH 1/4] ADD: black material str is now in lowercase --- pyalapin/engine/material.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pyalapin/engine/material.py b/pyalapin/engine/material.py index a76941c..2e61f86 100644 --- a/pyalapin/engine/material.py +++ b/pyalapin/engine/material.py @@ -495,7 +495,8 @@ def get_str(self): str String representation of the piece """ - return " P " + repr = " P " + return repr if self.is_white() else repr.lower() class Bishop(Piece): @@ -661,7 +662,8 @@ def get_str(self): str String representation of the piece """ - return " B " + repr = " B " + return repr if self.is_white() else repr.lower() class Rook(Piece): @@ -830,7 +832,8 @@ def get_str(self): str String representation of the piece """ - return " R " + repr = " R " + return repr if self.is_white() else repr.lower() class Knight(Piece): @@ -927,7 +930,8 @@ def get_str(self): str String representation of the piece """ - return " N " + repr = " N " + return repr if self.is_white() else repr.lower() def get_potential_moves(self, x, y): """Method to list all the possible moves from coordinates. Only uses authorized movements, no other pieces on a @@ -1178,7 +1182,8 @@ def get_str(self): str String representation of the piece """ - return " Q " + repr = " Q " + return repr if self.is_white() else repr.lower() class King(Piece): @@ -1410,7 +1415,8 @@ def get_str(self): str String representation of the piece """ - return " K " + repr = " K " + return repr if self.is_white() else repr.lower() def is_checked(self, board): """Method to verify that the king at its current position is not threatened / checked by opponent material. From 356830e5b5e0342a9d184ddaee557f5929bf4cdb Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Fri, 17 Nov 2023 22:32:27 +0100 Subject: [PATCH 2/4] setup files go to v0.0.3 --- pyalapin/__init__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyalapin/__init__.py b/pyalapin/__init__.py index f81330f..706d509 100644 --- a/pyalapin/__init__.py +++ b/pyalapin/__init__.py @@ -3,5 +3,5 @@ """ # from .interface import interface as interface -__version__ = "0.0.2" +__version__ = "0.0.3" __author__ = "Vincent Auriau" diff --git a/pyproject.toml b/pyproject.toml index 3c08a8a..adca9bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pyalapin" -version = "0.0.2" +version = "0.0.3" authors = [ { name = "Vincent Auriau", email = "vincent.auriau.dev@gmail.com"}, ] From f7a612d0aabb6ab2787f6309b74e6b9db2dbc76a Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Fri, 17 Nov 2023 22:41:37 +0100 Subject: [PATCH 3/4] ADD: automated release github action --- .github/workflows/release.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..eaa63ca --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,29 @@ +name: PyPI Release + +on: + push: + tags: + - "*" + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.6" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build the dist files + run: python setup.py sdist bdist_wheel + - name: Publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: twine upload dist/* \ No newline at end of file From 80c06238354b968bbff8c3276b117bcfb8126cab Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Fri, 17 Nov 2023 23:03:55 +0100 Subject: [PATCH 4/4] ADD: letters coordinates on board --- pyalapin/engine/engine.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyalapin/engine/engine.py b/pyalapin/engine/engine.py index bd8496a..47d611c 100644 --- a/pyalapin/engine/engine.py +++ b/pyalapin/engine/engine.py @@ -936,6 +936,8 @@ def draw(self, printing=True): whole_text += current_line whole_text += "\n" whole_text += boarder_line + whole_text += " | a | b | c | d | e | f | g | h |" + whole_text += boarder_line if printing: print(whole_text + "\n") return whole_text