Skip to content

Commit

Permalink
Merge branch 'v0.0.3' into stockfish
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentAuriau authored Nov 17, 2023
2 parents 79ff5bc + f457535 commit a95f155
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 8 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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/*
2 changes: 1 addition & 1 deletion pyalapin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"""
# from .interface import interface as interface

__version__ = "0.0.2"
__version__ = "0.0.3"
__author__ = "Vincent Auriau"
2 changes: 2 additions & 0 deletions pyalapin/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 11 additions & 6 deletions pyalapin/engine/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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.
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 = "pyalapin"
version = "0.0.2"
version = "0.0.3"
authors = [
{ name = "Vincent Auriau", email = "[email protected]"},
]
Expand Down

0 comments on commit a95f155

Please sign in to comment.