Giter Site home page Giter Site logo

chess's Introduction

IT engineer with over 15 years of self-learning in software dev. I build websites, end-user applications, client-server software and videogames.

I like breaking boundaries and making things in unique ways.

chess's People

Contributors

unradelic avatar

Stargazers

 avatar

Watchers

 avatar

chess's Issues

Notation translation: From function to const (easy)

Both of the functions to translate from either standard notation such A1 or F8 to index coordinates or viceversa can actually be defined as constant associative arrays and replace the functions fully.

chess/chess.js

Lines 261 to 270 in 7af0790

function notationToCoord(notation) {
let first = notation[0];
let second = notation[1];
switch (first) {
case 'a':
first = 1;
break;
case 'b':
first = 2;
break;

chess/chess.js

Lines 292 to 301 in 7af0790

function coordToNotation(coord) {
let first = coord[0];
let second = coord[1];
switch (first) {
case 1:
first = 'a';
break;
case 2:
first = 'b';
break;

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.