alegrand42 / BattleChallenge

Battle game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

CircleCI Build Status

Welcome to the Battle Challenge app. This rails app enables you to create fighters in order to make them fight in an arena.

Start

WARNING: The postgres database must be created first. Its name and data are handled with the gem figaro, the env variables are stored in the config/application.yml file. Their name can be found in the config/database.yml file. Once the postgres data are set:

bin/rails db:migrate RAILS_ENV=development

Examples are also provided.

rake db:seed

Walkthrough

First create a character, the path to player creation is on the header. Pick a name and a story for this player then choose an attack it can't overcome the value 5 same thing for its armor. Before each action a dice will be rolled to see if the armor is pierced: five id the best armor value. Once two figters are created, a battle may start. Click on the battle tab, choose 2 fighters, then press the fight button to get all data in the arena. Any fighter can carry weapon which can increase their attack or defense rate.

Test

Tests are inside the spec folder.

bundle exec rake db:drop RAILS_ENV=test
bundle exec rake db:create RAILS_ENV=test
bundle exec rake db:schema:load RAILS_ENV=test
bundle exec rspec spec

Dependencies

  • Rails version rails 5.1.6

  • System dependencies postgresql

About

Battle game


Languages

Language:Ruby 67.9%Language:HTML 27.1%Language:CSS 2.7%Language:JavaScript 1.4%Language:CoffeeScript 0.9%