Giter VIP home page Giter VIP logo

battlegame's Introduction

Battle ๐ŸŽฎ๐ŸŽฎ Build Status

This project was about building a battling game in pairs throughout the week using Ruby. We learnt how to connect different elements such as players, scores and attacks in diferrent routes of the controller. Given we did this in pairs, this was a work in progress project as we jumped between people's projects across the week depending on thier progress.

How to use

  1. Clone the project
git clone https://github.com/thatdania/Battlegame.git
  1. Change into the project directory in your terminal
cd battle
  1. bundle install to get all the dependencies
bundle install 
  1. Run the Server
ruby app.rb 
  1. Check in your url at localhost:4567
http://localhost:4567

Enjoy the basics of a game!

Domain Model (User stories that we wanted to cover)

A strategy to approaching the problems of the challenge was to list out all the user stories that represented requirements for the website in order for it to accomplish the challenge. My pair partner and I came up with this model before touching any code in order to know what requirements neede to be met.

Objects Messages Output
fight(names) enter and see Start fight by seeing names
P2 Hit points want to see See player 2's hit points
confirmation attack P2 P1 wins a game of battle
Attack(HP) reduce P2 hp is reduced by 10
turns switch Switch from P2 to P1 turn
hit points see P1 sees their hit points
confirmation attack P1 should lose a battle game
attack(HP) reduce P1 Hp reduces by 10
message(0hp) lose P1 loses a game of battle

Domain Model (Other Userstories we wanted to acheive but didn't)

Objects Messages Output
damage amount deal Attacks deal a random hp
opponent play lonely player plays computer
range of attacks attack P2 P1 wins a game of battle
opponent (attack) paralyse Opponent loses chance to attack
opponent (chance) poisoning Attack poisons opponent
Hit points heals P1 hit points are healed , increased
sexy interface use an appearance to enjoy while playing

battlegame's People

Contributors

thatdania avatar ipbianco avatar lewisyoul avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.