condrerf / amidakuji Goto Github PK
View Code? Open in Web Editor NEWJapanese Amidakuji program
License: MIT License
Japanese Amidakuji program
License: MIT License
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をご覧ください。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.