Giter Club home page Giter Club logo

snake-invaders's Introduction

Project Information: snake-invaders

This is a game that I am using to learn the use of classes, inheritance and an introduction to testing. I was able to practice using arrays to create items with different properties (e.g. A super class, then sub-classes each with their own health and damage parameters).

I created a button to randomly select an element from the screen and then apply damage to that item. And created different logic so that if the queen's health hit's 0 then all the rest do too. The user can then reset the game to start again.

After getting the logic working, I refactored the code and split my classes out into modules, importing them into my main JS file.

When this was all working, I wrote some tests using jest to allow for automated testing of the game logic.

How to install

git clone the repository and then yarn install this will ensure that you have any dev dependencies needed and be able to run the test package.

Current state

The game is functioning and has taught me a lot about how to use classes and

Next steps

Using the JS to populate HTML as the elements are instantiated.

snake-invaders's People

Contributors

mjp45 avatar

Watchers

James Cloos avatar  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.