GithubHelp home page GithubHelp logo

rock-paper-scissors's Introduction

Rock Paper Scissors Game

Introduction

For this mini-project, the assignment was to create a Rock Paper Scissors game using Javascript to practice what we've learnt about control flow, loops and DOM interaction. The game should allow the user to make their choice via clicking a button, generate a random choice for the computer player, display the running score, and announce a winner of the game once one player reaches 5 points.

Check out my attempt: https://robbailiff.github.io/rock-paper-scissors/

The assignment is part of The Odin Project curriculum, which is free and open source and uses on freely available resources in each of the modules. The ethos of the project is learning by building things, with the added bonus of creating projects that can be showcased in a portfolio.

Check out The Odin Project here.

Learning

This was quite a challenging but also very enjoyable project. There was an awful lot to take in from the DOM Manipulation lesson so it took some time to sit down and think about the best way to approach the problem. It didn't take me long to all to code out the basic logic but it did tae a bit of time to figure out the best way to organise the button logic. This did force me to think "in Javascript" because I had originally tried to embed the event listeners inside a while loop, as that is what I would do if I was making a similar game in Python. I then realised that wouldn't be necessary when I could instead simply embed the game functionality in the event listener callback. I spent about a day or so thinking about the project and then spent probably 10-15 hours working on it and refactoring the code.

I particularly enjoyed doing all the CSS styling and probably about 40% of the time spent on the project was spent on the visual design. The theme was inspired by 80s sci-fi movie computer terminals like those in Aliens film franchise, and also by the Pip-boy computer from the Fallout video game series. I learnt a lot about animations and their properties whilst creating the loading screen and the flicker effect, which were a lot of fun. Overall this was a great project from the course designers at The Odin Project that really reinforced the concepts that have been taught so far.

rock-paper-scissors's People

Contributors

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