Releases: software-challenge/player_python
v1.0.8
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
@dataclassdecorator 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:
- Added code of conduct by @maxblan in #23.
- Added new contribution guidelines by @maxblan in #22.
- Cleanup by @maxblan in #31.
Full Changelog: v1.0.7...v1.0.8
v1.0.7
v1.0.6
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
v1.0.4
What's Changed
Added
- Added test for game state.
Fixed
Improved
- Split up
penguinclasses into separate files. - Improved copying of objects for
penguinwhich now works almost twice as fast.
Changed
- Fixed a problem in
package_builderwhich is why it was copying the newly created folder again.
Removed
- Removed
setupbecause 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
Full Changelog: v1.0.3...v1.0.4
v1.0.3
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
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
Many thanks to @YoEnte and @RubyKanima for their contribution.
What's Changed
-
Classes and attributes:
- Added
Coordinatesuper class - Added
TeamEnumenumeration class - Added
team_enumattribute toMoveclass - Added
Penguinclass - Added
penguinandfishattributes to theFieldclass - Removed color and added
name,fish,penguins,movesattributes in theTeamclass - Added
first_team,second_teamattribute toGameStateclass - Removed the
Fishclass - Adapted the methods of
GameStateto the new classes - Moved
opponentfromTeamtoGameState
- Added
-
Renamed and remade existing elements:
- Remade
pretty_printfor a more concise look - Adapted methods of
Board - Remade
get_teams_penguinswhich returnsList[Penguin]now - Reworked the
NetworkSocketclass - Reworked the
XmlProtocolInterfaceclass - Reworked
GameClient
- Remade
-
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
-
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
v0.9.9
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