Coder Social home page Coder Social logo

robotwars's Introduction

robotwars

This project is purely JavaScript, with a tiny bit of jQuery, HTML and CSS thrown in.

The remit was to write a small application that would allow two robots to be set up. They would have some initial coordinates and some directions in which to move. They would move alternately. The winner would be declared if one robot was to move into a square already occupied by the other robot.

It did not need to ba an animated application, but I thought it would be fun to have the robots actually move around, so that's what I did.

Construct a grid.

Allow the user to set starting points and movements.

Start the war.

Find out the result.

To improve the functionality I added a few tweaks, such as giving the user the ability to edit the set of movements and to have a delay in the movements, which necessitates the use of a JavaScript callback.

All in all good fun and only took me about 4 hours.

robotwars's People

Contributors

bee7er avatar

Stargazers

 avatar

Watchers

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