<commit_before># ARTEMIS

A backend REST API that serves as a game engine for "choose your own adventure" type story games.

The intent is to have a CMS (WordPress) to handle the front end while the backend API
provides enforcement of game logic. Included within this repo is a WordPress plugin which interfaces
with the API.

Your frontend does not have to be WordPress. The selling point of this engine is to liberate you to
using whatever system or tools that you want to use for your frontend. Code your game as a Desktop
App in Java or use Unity instead, your restrictions are being able to make HTTP requests and
following the Artemis paradigm.

# INSTALLATION

TBD

# ARCHITECURE OVERVIEW

## cgi-bin/artemis

The controller which handles and routes HTTP requests to Artemis perl modules. This utilizes the Mojolicious framework. 

## lib/Artemis

The model aims to be domain-driven. These are Perl modules by the way which interfaces with MySQL.

### Artemis::Action

Represents "doing" something in the gameworld. Often composed of conditions and operations. When you _execute_ an action,
The conditions are first evaluated; If they return true then the operations manipulate the game in some way, otherwise
an error is thrown. Some example actions are "EnterSymposium", "Move", "Cast", "Damage".

### Artemis::Board

Extends [Games::Board](http://search.cpan.org/~rjbs/Games-Board/lib/Games/Board.pm) CPAN Module; This module handles
the locations of Entites on a "world" board or combat boards (more broadly reffered to as symposiums).

### Artemis::Entity

A person, place, or thing that is in existance within the game world we are making.

### Artemis::Matriarch

The background director that automates similiar to a game master. Does this by making requests in the Symposium queue.

### Artemis::Symposium

A queue manger for turn-based events such as combat. Handles requests and executes them.

## wp-content/plugins/artemis.php

Plugin allowing WordPress to integrate with the Artemis API. Wordpress will be handling presentation
along with user management and authentication.

FrontEnd WordPress Screenshot

![A screenshot of the front end](images/FrontEnd_ScreenShot.png "WordPress ScreenShot")

# EXAMPLES

As of April 9, 2017, much of Artemis' functionality is still in development when this section was written.

In the curl examples, assume _localhost_ as the address which Artemis is running at.

## Character

This section pertains to character manipulation

### Create

    curl -X POST localhost/cgi-bin/artemis

Returns the newly created CharacterId

### Retrieve

    curl localhost/cgi-bin/artemis/:CharacterID

Returns stats and other information for given CharacterID

### Update

Resources to update the character

#### Move

    curl localhost/cgi-bin/artemis/:CharacterID/location/:NewLocation

Moves a character to a new location. Restraints are that the previous location has been listed as valid
within the new location. If attempting an illegal move then an error occurs.


<commit_msg>Fixing README formatting<commit_after># ARTEMIS

A backend REST API that serves as a game engine for "choose your own adventure" type story games.

The intent is to have a CMS (WordPress) to handle the front end while the backend API
provides enforcement of game logic. Included within this repo is a WordPress plugin which interfaces
with the API.

Your frontend does not have to be WordPress. The selling point of this engine is to liberate you to
using whatever system or tools that you want to use for your frontend. Code your game as a Desktop
App in Java or use Unity instead, your restrictions are being able to make HTTP requests and
following the Artemis paradigm.

# INSTALLATION

TBD

# ARCHITECURE OVERVIEW

## cgi-bin/artemis

The controller which handles and routes HTTP requests to Artemis perl modules. This utilizes the Mojolicious framework. 

## lib/Artemis

The model aims to be domain-driven. These are Perl modules by the way which interfaces with MySQL.

### Artemis::Action

Represents "doing" something in the gameworld. Often composed of conditions and operations. When you _execute_ an action,
The conditions are first evaluated; If they return true then the operations manipulate the game in some way, otherwise
an error is thrown. Some example actions are "EnterSymposium", "Move", "Cast", "Damage".

### Artemis::Board

Extends [Games::Board](http://search.cpan.org/~rjbs/Games-Board/lib/Games/Board.pm) CPAN Module; This module handles
the locations of Entites on a "world" board or combat boards (more broadly reffered to as symposiums).

### Artemis::Entity

A person, place, or thing that is in existance within the game world we are making.

### Artemis::Matriarch

The background director that automates similiar to a game master. Does this by making requests in the Symposium queue.

### Artemis::Symposium

A queue manger for turn-based events such as combat. Handles requests and executes them.

## wp-content/plugins/artemis.php

Plugin allowing WordPress to integrate with the Artemis API. Wordpress will be handling presentation
along with user management and authentication.

FrontEnd WordPress Screenshot

![A screenshot of the front end](images/FrontEnd_ScreenShot.png "WordPress ScreenShot")

# EXAMPLES

As of April 9, 2017, much of Artemis' functionality is still in development when this section was written.

In the curl examples, assume _localhost_ as the address which Artemis is running at.

## Character

This section pertains to character manipulation

### Create

    curl -X POST localhost/cgi-bin/artemis

Returns the newly created CharacterId

### Retrieve

    curl localhost/cgi-bin/artemis/:CharacterID

Returns stats and other information for given CharacterID

### Update

Resources to update the character

#### Move

    curl -X PUT localhost/cgi-bin/artemis/:CharacterID/location/:NewLocation

Moves a character to a new location. Restraints are that the previous location has been listed as valid
within the new location. If attempting an illegal move then an error occurs.



{'fraction_non_alphanumeric': 0.05485996705107084, 'fraction_numerical': 0.0016474464579901153, 'mean_word_length': 4.5190909090909095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6141375', 'n_tokens_mistral': 1664, 'n_tokens_neox': 1541, 'n_words': 830}