xmeltrut/word-search 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

xmeltrut/word-search

最新稳定版本:1.0.3

Composer 安装命令:

composer require xmeltrut/word-search

包简介

Word search generator.

README 文档

README

Build Status Latest Stable Version License

Word search generator written in PHP.

Features:

  • Supports multiple words and grid sizes
  • Supports horizontal and vertical words
  • Supports intersecting words
  • English and Finnish alphabets

Produces a grid for you to output, and list of answers.

HHEOÖ
EÖBAR
LSJFD
LLTOK
OPÖOU

Install

Install via Composer:

$ composer require xmeltrut/word-search "^1.0"

Usage

In English:

$puzzle = WordSearch\Factory::create(['foo', 'bar']);

In Finnish, with a custom grid size:

$puzzle = WordSearch\Factory::create(
    ['mansikka', 'omena', banaani'],
    10,
    'fi'
);

The Puzzle object contains a toArray method for the puzzle grid and an iterable WordList object with the answers in. You can use these to output the puzzle yourself, or use the HTML transformer.

$transformer = new WordSearch\Transformer\HtmlTransformer($puzzle);
echo $transformer->grid();
echo $transformer->wordList();

Development

Tests can be run via Ant:

ant

统计信息

  • 总下载量: 2.05k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-22