Code Monkey home page Code Monkey logo

brain_games's Introduction

Hi there 👋

brain_games's People

Contributors

rende11 avatar

Watchers

 avatar

brain_games's Issues

https://github.com/Rende11/js_l1_brain_games-s12/pull/13

Переусложненный дизайн программы. Невозможно просто добавить игру, нужно править какие-то общие файлы.

Судя по играм, у них разный интерфейс (экспортируются разные вещи). Зачем так делать? Чтобы нельзя было просто добавить игру?)

+const calc = (array) => {

  • switch (array[2]) {
  • case '+':
  •  return array[0] + array[1];
    

зачем оперировать массивом?

const array = [];

  • array.push(myRandInt());
  • array.push(myRandInt());
  • array.push(getRandomMathOperation());
  • return array;
    Зачем такой способ инициализации, который требует мутации?

+const operations = '+-*/';
+const getRandomMathOperation = () => {

  • const position = getRandomInt(0, operations.length);
  • return operations[position];
    +};
    Тоже очень сложно. А если у меня появится операция возведения в степень, которая состоит из двух символов **? Не проще взять массив и попросить его вернуть рандомное значение?

console.log(start('even'));

смысл делать console.log на вызове этой функции от меня ускользает.

import start from '../index';

js и так пытается взять index, его не надо указывать

"main": "./src/index.js",

Мейн нужен для продакшена, а не для разработки. При таком задании твой пакет не заработает у пользователя. Ты пробовал его поставить и запустить? Он у тебя должен упасть с ошибкой.

Изучай javascript-packages и то как там бабель используется.

Readme

add normal descriptions

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.