Skip to content

Conversation

@maxblan
Copy link
Collaborator

@maxblan maxblan commented Apr 22, 2023

Description

Please include a summary of the change and which issue is fixed.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

With unit tests.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@maxblan maxblan merged commit e59fa22 into master Apr 22, 2023
@maxblan maxblan deleted the functional branch May 4, 2023 20:36
maxblan added a commit that referenced this pull request May 12, 2023
feat(field): add test case for order

feat(network): add test case for receiving xml data

Feature/v108 (#33)

* feat(penguins): Add dataclass for Field and Board

This commit adds dataclasses for the Field and Board classes in socha/api/plugin/penguins/board.py.
The dataclasses allow us to have more concise and readable code while also taking advantage of immutability and
hashability, which are important properties for the game logic.

Additionally, the commit replaces some method names with more descriptive ones and removes unnecessary comments
and type hints for constructor parameters.

The changes include:

    Add @DataClass decorator to Field and Board classes
    Remove constructor from Field class and replace with a more concise dataclass syntax
    Replace board constructor parameter in Board class with board dataclass parameter
    Rename _is_destination_valid method to is_destination_valid
    Add Generator and Iterator type hints to method signatures when appropriate
    Change some variable names to be more consistent with PEP 8 conventions

* feat(plugin): add dataclasses to coordinate module

Add dataclasses to the coordinate module to simplify the implementation of Vector, CartesianCoordinate, and HexCoordinate classes.

The Vector class now uses the @DataClass decorator and its attributes are defined in the class header. The __init__, __repr__, and __eq__ methods were removed.

The Coordinate, CartesianCoordinate, and HexCoordinate classes are similarly modified to use the @DataClass decorator and define their attributes in the class header. The __init__, __repr__, and __eq__ methods were also removed.

This commit improves code readability and reduces code redundancy.

* feat(GameClient): Add feature for headless running and administrator activities

* feat: Add dataclass for GameState

* refactor: typos and add "prepared" to regex

* feat: add several dataclasses for the xml protocol to be able to administer

* feat: add super class

* feat: add configurations to Starter for headless and administrator mode

* feat: add dataclass

* fix: adjust tests for new dataclasses

* refactor: typos and pep 8

* refactor: bump to 1.0.8

* fix(package builder): not copying main logic

* fix(package builder): a bug that caused infinite copying

* feat(socha): log levels and verbose option

---------

improved(socha): code for readability (#32)

Cleanup (#31)

* cleanup(socha): code of pollution and generalized it

* improved(socha): code for readability

---------

add(contribution): new contribution guidelines (#22)

Create CODE_OF_CONDUCT.md (#23)

Create pull_request_template.md

Fix typo (#30)

Co-Authored-By: Falcon <35808469+FalconsSky@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants