Giter VIP home page Giter VIP logo

amidakuji's Introduction

1.プロジェクト概要

特定のデータファイルを読み込んであみだくじを生成し、
くじの特定の縦線の位置に最終的に到達する縦線の番号を求めます。
逆に、特定の縦線の位置からくじを開始した場合に最終的に到達する縦線の番号を求めることも出来ます。


2.プロジェクト構成

index.php あみだくじの動作確認用のスクリプトです。
data/error_empty.dat 動作確認テスト用のデータファイルです。
data/error_include_character.dat 動作確認テスト用のデータファイルです。
data/error_not_3_columns.dat 動作確認テスト用のデータファイルです。
data/error_one_row.dat 動作確認テスト用のデータファイルです。
data/example1.dat 例1のあみだくじデータファイルです。
data/example2.dat 例2のあみだくじデータファイルです。
src/Amidakuji.php あみだくじを管理するクラスです。
src/Coordinate.php XY座標を管理するクラスです。
src/Field.php あみだくじのフィールドを管理するクラスです。
src/Unit.php あみだくじのユニット(あみだくじの線を移動する主体)を管理するクラスです。
src/Line/Line.php あみだくじの線(縦/横)を管理するクラスです。
src/Line/TransverseLine.php あみだくじの横線を管理するクラスです。
src/Line/VerticalLine.php あみだくじの縦線を管理するクラスです。
tests/AmidakujiTest.php Amidakujiクラスのテストクラスです。
tests/CoordinateTest.php Coordinateクラスのテストクラスです。
tests/FieldTest.php Fieldクラスのテストクラスです。
tests/LineTest.php Lineクラスのテストクラスです。
tests/TransverseLineTest.php TransverseLineクラスのテストクラスです。
tests/UnitTest.php Unitクラスのテストクラスです。
tests/VerticalLineTest.php VerticalLineクラスのテストクラスです。

以下は、PHP.Skeletonにより自動生成されたファイルです。
.php_cs
.scrutinizer.yml
.travis.yml
composer.json
composer.lock
LICENSE
phpcs.xml
phpmd.xml
phpunit.xml.dist
src/Exception/ExceptionInterface.php
src/Exception/LogicException.php
src/Exception/RuntimeException.php
tests/bootstrap.php
tests/Fake/.placefolder


3.実行方法

(1)data/ディレクトリ内に、あみだくじのデータファイルを設置する。
(2)データファイル名を指定して、Amidakujiクラスのインスタンスを生成する。
(3)最終的に到達する縦線の番号を指定して、findStartNumber関数を実行する。
(4)findStartNumber関数の戻り値を出力する。

実行例は、index.phpをご覧ください。

amidakuji's People

Contributors

condrerf avatar

Stargazers

 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.