Giter Club home page Giter Club logo

hackarena's Introduction

How is it going everyone? My projects, blog, and consulting services are on v1v2.io. Cheers and keep on coding folks! โœŒ๏ธ

hackarena's People

Contributors

anthonymayer avatar bobanj avatar jdb8 avatar ruairid avatar verekia avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

digideskio

hackarena's Issues

Server should only deal with logical coordinates

I want to make the server forget about pixels entirely. In most places this is as simple as removing MAP_TILE_SIZE, but there might be places where we made calculations with the assumption that we were dealing with pixels. For example, in main.py:

def has_obstacle_there(self, char_pos_x, char_pos_y, direction):
        if (
            direction == 'LEFT' and MAP_OBSTACLES[63 * char_pos_y + char_pos_x - 1] != 0 or
            direction == 'RIGHT' and MAP_OBSTACLES[63 * char_pos_y + char_pos_x + 1] != 0 or
            direction == 'DOWN' and MAP_OBSTACLES[63 * char_pos_y + char_pos_x + 63] != 0 or
            direction == 'UP' and MAP_OBSTACLES[63 * char_pos_y + char_pos_x - 63] != 0
        ):
            return True
        return False

I'm a bit scared to touch this as I'm not entirely sure what the significance of the 63 is here.

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.