Coder Social home page Coder Social logo

name-maker's Introduction

世界観の地名作成のために作成、加工したJavascriptの名前生成プログラムです。

処理について

  1. csvファイルの内容を取得して、1行毎に分けます
  2. 分けた1行分をそれぞれ,で分けます
  3. 1行の一番最初にある数字を元に、付けるかどうかの判定をします
  4. 付ける場合は、1行の2番目の数字から3番目の数字の範囲で、持っていく文字列の回数を決めます
  5. ,で分けた文字列を決めた回数分、ランダムで選定します
  6. 1行毎に選定した文字列をくっつけます

csvデータのフォーマット

1行を読み込む際、以下のフォーマットで処理していきます

  • 1番目は、入れる確率を設定します(0~100の確率で決めます)
  • 2番目は、最小出力回数を設定します
  • 3番目は、最大出力回数を設定します

最小出力回数が最大出力回数を上回るとエラーが発生します。

添付しているcsvデータについて

Thanks

name-maker's People

Contributors

aokashi avatar

Stargazers

Matsuyuki avatar  avatar

Watchers

James Cloos avatar  avatar

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.