Javascript game program

Budget $30 - $250 USD
Bids 7
Average Bid $185

A program using Javascript to simulate 3 cars on a road and a stoplight. Each car is either moving at full speed, which is one unit per second, or it is stopped because of the stoplight. The stoplight is either green or red. If a car is at the same position as the stoplight (i.e. 50), and the stoplight is red, the car stops until the light turns green. You can assume that cars can occupy the same space without regard for each other.

The cars initially start at positions 24, 12, and 0. The stoplight is at position 50, is initially green, and switches every 10 seconds.

This program should simulate 100 seconds of operation. For each second, it should print out a line with the second number, the state of the stoplight and the positions of all three cars. The 'seconds' are simulated, and they can advance through a mechanism of your choosing (eg clicking a button, interval timer, keystroke, etc)

Post a Project Like This

This project was awarded to

no1msd

I have Apps developed on behalf of clients. I will 100% be using Daniel again for Android Apps. He was brilliant, super efficient and he finished the App in less than 24 hours!!! IT was an absolute please dealing with him. His work is of the highest quality. Thank you
About the Freelancer
no1msd Profile Picture

I'm an engineer most passionate about web and mobile development. I love working with Android both in Java and native C++, and I've been developing for the platform since 2008. I'm also a fan of HTML5, and I have plenty of experience working with JavaScript, node.js, MongoDB and jQuery. As for the more conservative technologies, I prefer working with PHP and PostgreSQL or MySQL.

Looking to make some money?

  • Set your budget and the time frame
  • Outline your proposal
  • Get paid for your work

Bids on this Project

  • GraphicsApp Profile Picture

    GraphicsApp

    Miami,  United States

    GraphicsApp is led by a skilled programmer with a lot of experiences in the software development. Together, we will develop your dreams with a friendly and awesome application and a robust, simple and very flexible code. My passion are algorithms, interactive apps, computer graphics and games. Best Regards Team Lead Ruben

    ASP, C Programming, Java, and Javascript

  • RITESHBATHWAL Profile Picture

    RITESHBATHWAL

    Madhupur,  India

    Woocommerce, Wordpress, PHP developer. Free bug fixing will be provided if reported within one month of delivery, minimal charges afterwords .

    PHP, Javascript, Website Design, and Graphic Design

  • no1msd Profile Picture

    no1msd

    Budapest,  Hungary

    I'm an engineer most passionate about web and mobile development. I love working with Android both in Java and native C++, and I've been developing for the platform since 2008. I'm also a fan of HTML5, and I have plenty of experience working with JavaScript, node.js, MongoDB and jQuery. As for the more conservative technologies, I prefer working with PHP and PostgreSQL or MySQL.

    PHP, Perl, Java, and Javascript

  • inkas91 Profile Picture

    inkas91

    Ruse,  Bulgaria

    I am a talented and experienced Front-end and Back-end developer. I have good experience with HTML5 / CSS3 / JavaScript / jQuery / WordPress / PHP / AJAX. I am a hard worker and enjoy working at all critical conditions. If hired by you I will be responsible to complete the task within the stipulated time frame and with utmost confidence. Outsource me for your project and I promise to bring in the best output. Areas of Expertise » HTML, HTML5, CSS3 » JavaScript, jQuery, PHP & MySQL » WordPress CMS » PSD to HTML Conversion » HTML5 Responsive Expert » Landing Page Coding

    PHP, Javascript, Translation, and Photography

  • aaronshawpro Profile Picture

    aaronshawpro

    Gold Coast,  Australia

    I am a web developer / designer and programmer with several years of experience. I pride myself on my abilities and I always get the job done no matter what it takes. I have a passion for technology and writing clean code. I hold a professional manner and always strive to keep my clients and employers happy. I communicate on a regular basis and always respond in a timely manner.

    PHP, Java, Javascript, and XML

  • danguafer Profile Picture

    danguafer

    Presidente Prudente,  Brazil

    General Computer Science researcher.

    C Programming, Javascript, Adobe Flash, and AJAX

  • vijaykb81 Profile Picture