MazesOfMonad

Twitter 経由で Haskell で実装されたローグライクゲーム MazesOfMonad があると知り、早速試してみた。

まずコンパイルしないと話にならない。 cabal という haskell のビルドシステムを使っているので configure, build, install の 3 ステップが必要。しかし configure の時点で time -any が見つからないと文句を言われる。検索すると time パッケージも見つかった (time)。

というわけで以下、コンパイルに使ったコマンドの羅列 (コマンドの出力は省略)。ちょう簡単。

$ wget http://hackage.haskell.org/packages/archive/time/1.1.3/time-1.1.3.tar.gz
$ tar xzf time-1.1.3.tar.gz
$ pushd time-1.1.3
$ runghc Setup configure --user
$ runghc Setup build
$ runghc Setup install
$ popd
$ wget http://hackage.haskell.org/packages/archive/MazesOfMonad/1.0.5/MazesOfMonad-1.0.5.tar.gz
$ tar xzf MazesOfMonad-1.0.5.tar.gz
$ pushd MazesOfMonad-1.0.5
$ runghc Setup configure --user
$ runghc Setup build
$ runghc Setup install
$ popd

MazesOfMonad のインストール完了メッセージが "Installing executable(s) in /Users/ryohji/.cabal/bin" だったのでディレクトリーをチェック。

$ ls ~/.cabal/bin
mazesofmonad

どうやら実行形式ひとつらしい。さっそく実行する。

$ ~/.cabal/bin/mazesofmonad
Welcome to Mazes of Monad, JP Moresmau's Role-Playing Game
If you don't know what to type, try help!

うを!シンプルー!
とりあえず help としてみると…:

help
>?: Provides help on available actions
characters: Characters: new character, delete
games: Games: new game, load , delete
help: Provides help on available actions
quit: Exit the game

全部タイプしなくても、先頭の数文字をタイプしてマッチするコマンドとして解釈、実行してくれるようだ。
つづきは要望があったら書くよ!