-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(game_state): partially fix erroneous perform move
fixes the incorrect calculation of the field when checking for blocked fields etc. Currently only one error occurs where the wrong vessel ahead is determined
- Loading branch information
Showing
14 changed files
with
721 additions
and
702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
from logging import DEBUG | ||
from socha import GameState, Move, Starter, Advance | ||
from socha import GameState, Move, Starter, Advance, Turn, CubeDirection | ||
from socha.api.networking.game_client import IClientHandler | ||
|
||
|
||
class Logic(IClientHandler): | ||
game_state: GameState | ||
|
||
def calculate_move(self) -> Move: | ||
return Move(actions=[Advance(distance=1)]) | ||
return Move(actions=[Advance(1)]) | ||
|
||
def on_update(self, state: GameState): | ||
self.game_state = state | ||
|
||
|
||
if __name__ == "__main__": | ||
Starter(logic=Logic(), log_level=DEBUG) | ||
Starter(logic=Logic()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.