|Build Status| |codecov.io|

=========
XOInvader
=========

Attempt to create small but serious game using **python** and
**ncurses**.

Requirements
============

General
-------

* Python3
* Tornado 4.x
* ncurses >=5.9

Optional requirements (for graphics)
------------------------------------

* Pygame >=1.9.0 (pygame.Mixer)
* SDL with devel (for compiling pygame from sources)
* gcc with devel (for compiling pygame from sources)
* python devel files (for compiling pygame from sources)


Development
===========

Installation
------------

.. code-block:: console

   # install virtualenv
   $ make devel
   $ source .venv/bin/activate
   $ pip install -e .

   $ xoigame  # ASCII with sound (Pygame.Mixer required)
   $ xoigame -ns  # ASCII without sound (pygame not required)
   $ xoigame -vd pygame-sdl  # Pygame-based version

Testing
-------

.. code-block:: console

   $ make test  # for all tests
   $ make view_cov  # run all tests and view coverage
   $ # pass additional arguments to pytest via PYTEST_ARGS env variable
   $ # you can pass args such way to test and view_cov make targets
   $ make test PYTEST_ARGS='-m "not slow"'  # don't run slow tests
   $ py.test --markers  # show all markers
   $ py.test xoinvader/path/to/test_file.py  # run separate file


Documentation
-------------

* Autogenerated from sources `here <http://www.g-v.im/>`__.
* Development `wiki <https://github.com/pkulev/xoinvader/wiki/>`_.
* Build documentation from sources:

  .. code-block:: console

     $ make docs
     $ make view_docs  # build and open in firefox


.. |Build Status| image:: https://travis-ci.org/pkulev/xoinvader.svg?branch=master
   :target: https://travis-ci.org/pkulev/xoinvader
.. |codecov.io| image:: http://codecov.io/github/pkulev/xoinvader/coverage.svg?branch=master
   :target: http://codecov.io/github/pkulev/xoinvader?branch=master
