Giter Club home page Giter Club logo

ultimate-ttt-py's People

Contributors

alexmillward avatar joffat avatar reddyalready avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ultimate-ttt-py's Issues

Investigate bug in MainBoard

MainBoard erroneously reports opponent's move being on an invalid board, even though the sequence of moves is valid:

[jerky@neptun ultimate-ttt-py]$ uabc --host localhost:3141 -t bar --verbose -f "python3 samples/random_player_wrapper.py"
+----------------------------------+
| Ultimate Algorithm Battle |
+----------------------------------+

Waiting for server...

Connected!
[00:40:17 server] init
[00:40:17 server] waiting
[00:40:17 server] opponent 2,2;2,1
[00:40:17 player] 2,1;1,1

[00:40:17 server] opponent 1,1;1,2
Error: Traceback (most recent call last):
File "samples/random_player_wrapper.py", line 12, in
main()
File "samples/random_player_wrapper.py", line 7, in main
random_player.process_input(line.strip())
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt_player/ultimate_ttt_player.py", line 67, in process_input
self.add_opponent_move(board_coords, opponent_move)
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt_player/random_player.py", line 22, in add_opponent_move
self.game = self.game.add_opponent_move(board, opponent_move)
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt/main_board.py", line 95, in add_opponent_move
return self._add_move(board_coords, PlayerMove(Player.OPPONENT, move))
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt/main_board.py", line 178, in _add_move
raise MoveNotOnNextBoardError(board_coords, self._next_board_coords)
ultimate_ttt.errors.MoveNotOnNextBoardError
client> child process exited with code 1
Connection lost!

This indicates a problem either with the MainBoard or the player itself.

Add move indices to sub board cells

Adding the move index to each cell records the order of the game and makes it easier to replay in the future (e.g. first cell played has a 1, second one has a 2 etc.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.