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 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/pyalapin/engine/engine.py b/pyalapin/engine/engine.py index c202394..a17f6f7 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 diff --git a/pyalapin/engine/material.py b/pyalapin/engine/material.py index 3d6971c..2e61f86 100644 --- a/pyalapin/engine/material.py +++ b/pyalapin/engine/material.py @@ -495,7 +495,7 @@ def get_str(self): str String representation of the piece """ - repr = " P " + repr = " P " return repr if self.is_white() else repr.lower() @@ -662,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): @@ -831,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): @@ -928,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 @@ -1179,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): @@ -1411,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. diff --git a/pyproject.toml b/pyproject.toml index 1b28371..ad22898 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"}, ]