Giter VIP home page Giter VIP logo

wasmdome-web's Issues

Coordinate translation isn't working properly

The domain model (event sourcing) treats the origin of the arena of (0,0) to be the bottom left corner of the arena, or the most Southwesterly point on the game board. This means that a position of (0,H) is the most northwest, and (H, W) is the most northeast where H and W are the board height and width.

When the mechs are displayed on the game board inside a CSS grid, the grid requires columns and rows, where col 0 and row 0 are the top left.

In its current state, the translation is not working. I also wasn't able to figure out how to turn on internal grid lines to make troubleshooting this easier.

The moduleCore.Mech has a to_gridpiece function that is not currently doing translation properly, and it's causing a cascading failure in the tests (which are commented out right now)

tl;dr:

Core.Mech.to_gridpiece needs to convert the {x,y} tuple into a column and row property on the grid piece.

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.