PHPackages                             yandod/php-warrior - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yandod/php-warrior

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yandod/php-warrior
==================

Game written in PHP for learning PHP and artificial intelligence.

v0.0.8(10y ago)9217611[2 issues](https://github.com/yandod/php-warrior/issues)1MITPHPPHP &gt;=5.4.0

Since May 29Pushed 4y ago6 watchersCompare

[ Source](https://github.com/yandod/php-warrior)[ Packagist](https://packagist.org/packages/yandod/php-warrior)[ RSS](/packages/yandod-php-warrior/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (6)Used By (1)

PHP Warrior
===========

[](#php-warrior)

This is a game designed to teach the PHP language and artificial intelligence in a fun, interactive way.

PHP Warrior is php version implementation of Ruby Warrior.

You play as a warrior climbing a tall tower to reach the precious PHP at the top level. On each floor you need to write a PHP script to instruct the warrior to battle enemies, rescue captives, and reach the stairs. You have some idea of what each floor contains, but you never know for certain what will happen. You must give the Warrior enough artificial intelligence up-front to find his own way.

Getting Started
---------------

[](#getting-started)

First install the package.

```
composer global require "yandod/php-warrior=*"
export PATH=$HOME/.composer/vendor/bin:$PATH
```

Then run the "phpwarrior" command to setup your profile. This will create a phpwarrior directory in your current location where you will find a player.php file in your profile's directory containing this:

```
