Git Product home page Git Product logo

arena's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

arena's Issues

Server crashes when client crashes

When I kill a client process, the server crashes with the following error:

Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/json/decoder.py", line 368, in raw_decode
    obj, end = self.scan_once(s, idx)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "supervise.py", line 17, in <module>
    supervise(host, int(port), GAMES)
  File "/Users/ggzach/Dropbox/projects/python/arena/plumbing/supervisor.py", line 83, in supervise
    handle_new_connection(sock, active_matches)
  File "/Users/ggzach/Dropbox/projects/python/arena/plumbing/supervisor.py", line 19, in handle_new_connection
    request_json = json.loads(request)
  File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/json/__init__.py", line 309, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/json/decoder.py", line 352, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/lib/python3.3/json/decoder.py", line 370, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Server crashes when invalid moves are sent to connect4

Traceback (most recent call last):
  File "supervise.py", line 17, in <module>
    supervise(host, int(port), GAMES)
  File "/Users/daniel/dev/2013/arena/plumbing/supervisor.py", line 86, in supervise
    handle_match_message(active_matches[sock], sock, complete_matches)
  File "/Users/daniel/dev/2013/arena/plumbing/supervisor.py", line 49, in handle_match_message
    match.make_move(move)
  File "/Users/daniel/dev/2013/arena/plumbing/match.py", line 73, in make_move
    self.game.transition(move['move'], self.game.current_player)
  File "/Users/daniel/dev/2013/arena/gameplay/connect4.py", line 40, in transition
    if self.board[i] == ' ':
IndexError: string index out of range

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.