Skip to content

Releases: software-challenge/player_python

v1.0.8

12 May 19:14

Choose a tag to compare

What's Changed

General Changes:

Code Organization and Structure:

  • Added dataclasses for Field and Board classes in socha/api/plugin/penguins/board.py, providing more concise and readable code, as well as immutability and hashability for game logic.
  • Replaced some method names with more descriptive ones and removed unnecessary comments and type hints for constructor parameters.
  • Added dataclasses to the coordinate module to simplify the implementation of Vector, CartesianCoordinate, and HexCoordinate classes.
  • Modified Vector, Coordinate, CartesianCoordinate, and HexCoordinate classes to use the @dataclass decorator and define attributes in the class header. Removed __init__, __repr__, and __eq__ methods from these classes.
  • Added dataclass for GameState.
  • Added several dataclasses for the XML protocol to support administration.
  • Added a super class.
  • Adjusted tests for new dataclasses.

Headless Mode and Administrator Activities:

  • Added feature for headless running and administrator activities.
  • Added configurations to Starter for headless and administrator mode.
  • Added log levels and verbose option to socha.

Bug Fixes:

  • Fixed a bug where the main logic was not being copied.
  • Fixed a bug that caused infinite copying.

Documentation and Miscellaneous:

Full Changelog: v1.0.7...v1.0.8

v1.0.7

07 Apr 09:48
608d1ea

Choose a tag to compare

What's Changed

  • fix(package builder): error with compressing the package by @maxblan in #29

Full Changelog: v1.0.6...v1.0.7

v1.0.6

07 Apr 09:14

Choose a tag to compare

What's Changed

  • Improved package builder. It now recognises all imported modules and creates its own build directory.

Full Changelog: v1.0.5...v1.0.6

v1.0.5

04 Apr 17:49

Choose a tag to compare

What's Changed

  • fix(game state): error that caused the opponent not updating by @FalconsSky in #27

Full Changelog: v1.0.4...v1.0.5

v1.0.4

31 Mar 18:28

Choose a tag to compare

What's Changed

Added

  • Added test for game state.

Fixed

  • Fixed imports in test.
  • make team_enum optional by @jnccd in #24

Improved

  • Split up penguin classes into separate files.
  • Improved copying of objects for penguin which now works almost twice as fast.

Changed

  • Fixed a problem in package_builder which is why it was copying the newly created folder again.

Removed

  • Removed setup because it was redundant.

Other

  • Manually garbage collected after object handling in game client.
  • Added check for the current team in starter.
  • Adjusted test for new pattern in perform_move.

New Contributors

  • @jnccd made their first contribution in #24

Full Changelog: v1.0.3...v1.0.4

v1.0.3

14 Mar 22:53

Choose a tag to compare

What's Changed

  • fix(package builder): builder copies now script files and empty directories

  • fix(reservation): error that occurred when the user tried to join with reservation code

Full Changelog: v1.0.2...v1.0.3

v1.0.2

12 Mar 15:48

Choose a tag to compare

What's Changed

  • update(script): shell script to work on the system

  • add(package builder): feature which will build and zip a package for the contest

Full Changelog: v1.0.1...v1.0.2

v1.0.1

25 Jan 18:10
86da9cd

Choose a tag to compare

Many thanks to @YoEnte and @RubyKanima for their contribution.

What's Changed

  1. Classes and attributes:

    • Added Coordinate super class
    • Added TeamEnum enumeration class
    • Added team_enum attribute to Move class
    • Added Penguin class
    • Added penguin and fish attributes to the Field class
    • Removed color and added name, fish, penguins, moves attributes in the Team class
    • Added first_team, second_team attribute to GameState class
    • Removed the Fish class
    • Adapted the methods of GameState to the new classes
    • Moved opponent from Team to GameState
  2. Renamed and remade existing elements:

    • Remade pretty_print for a more concise look
    • Adapted methods of Board
    • Remade get_teams_penguins which returns List[Penguin] now
    • Reworked the NetworkSocket class
    • Reworked the XmlProtocolInterface class
    • Reworked GameClient
  3. Fixed bugs and issues:

    • Fixed an issue with move that it no longer changes the original board
    • Fixed a problem with _get_possible_moves
    • Fixed a problem with current_team_from_turn
    • Fixed a problem with perform_move
    • Fixed several issues that caused crashes in socha
    • Fixed a problem where it wouldn't connect to the server in auto-reconnect
    • Fixed several issues that prevented the correct simulation and storing of game states in penguin
    • Fixed an issue where the protocol tag doesn't get sent if auto reconnect in XmlProtocolInterface
    • Fixed an issue where the client doesn't reconnect with auto-reconnect in NetworkSocket
  4. Other changes:

    • Added auto-reconnect feature to starter
    • Changed license to MIT
    • Extended history list in GameClient
    • Added some logging in GameClient
    • Added a doc that lists all changes from previous version, that can be found here.

Full Changelog: v1.0.0...v1.0.1

v1.0.0

20 Dec 15:02

Choose a tag to compare

What's Changed

  • release/0.9.9 by @FalconsSky in #17
  • penguins: resolve NoneType error for get_most_fish by @tms-hl in #19

New Contributors

Full Changelog: v0.9.9...v1.0.0

v0.9.9

14 Nov 13:11

Choose a tag to compare

What's Changed

  • implement the survive feature

It is now possible to let the client run when the game is over and the server closes its connection. This is very practical if the client is to play several games in succession. The test server is recommended for this, as it works without a UI and you do not have to start the game manually each time.

If this feature wants to be used, then this method must be implemented from IClientHandler and reconnect to the server and join a game.

def while_disconnected(self, player_client):
    player_client.connect_to_server()
    player_client.join_game()

It should also be noted that the starter requires the argument survive=True so that the client is not terminated when the servers closes the connection.

Starter(logic=Logic(), survive=True)

Full Changelog: v0.9.8...v0.9.9