Find Jobs
Hire Freelancers

javascript -- 5

$30-250 USD

Cerrado
Publicado hace más de 3 años

$30-250 USD

Pagado a la entrega
Follow the instructions to make bouncing balls galore. 1. Write code to define 4 parallel arrays to store info for unlimited balls (right now we do not know the size). The names of the parallel arrays are : a) xPos b) yPos c) xSpeed d) ySpeed e) ballColors 2. Inside void setup() do the following: a) Code a for-loop that runs 5 times. Inside the loop body write code to call addBall with random values for the first 2 parameters and color white as the value for 3 rd parameter. 3. Inside void mousePressed () : a) Call addBall once with mouseX , mouseY as values to first 2 parameters and a random color as the 3 rdparameter 4. Inside void draw() : a) Using a for-loop, make sure to draw all the balls with the information in the arrays xPos, yPos, xSpeed, ySpeed, ballColors. Extremely similar to the code in [login to view URL] (found in my box folder inside the folder 02_10_array_del_2D_array_intro/boucing_ball) . In that program we handle move one ball with info in the variables.. Here the info about all balls are inside the parallel arrays. [login to view URL] a function addBall with following features : a) It does not return any value b) Takes in the following parameters: i. X co-ordinate of the ball ii. Y co-ordinate of the ball iii. Color of the ball c) Goal : to make changes to the following arrays: i. Append the first parameter to the xPos . ii. Append the second parameter to the yPos . iii. Append a random value between 2 and 5 to the xSpeed array. iv. Append a random value between 3 and 7 to the ySpeed array. v. Append the third parameter to the ballColors array. HINT : In step 1, you would have created array with the option that size and element info is unknown (middle branch in the slide titled “How to define arrays”). So make sure to use the function append to add values to the arrays (check the slides to see how). Watch the video for how it should like when it opens up and how your code should behave when mouse is pressed.
ID del proyecto: 29299587

Información sobre el proyecto

5 propuestas
Proyecto remoto
Activo hace 3 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
5 freelancers están ofertando un promedio de $118 USD por este trabajo
Avatar del usuario
Hi there, I do JS. I went through the video of the bouncing ball and your requirements. I would like to do this project if given the opportunity. Let me know if you are interested so I can have further details.
$50 USD en 1 día
4,9 (114 comentarios)
5,6
5,6
Avatar del usuario
Hi, i can do your project in a day and send you the result, just if u want to give me a chance. Looking forward to cooperation. Best regards, Todor.
$200 USD en 1 día
5,0 (4 comentarios)
2,8
2,8
Avatar del usuario
I am an experienced programmmer and i have programmedd using javascript for a long time. I have gone through your task and I am glad it merges my skills and i would like to help you. Hire me and we can discuss details in the chat box.
$200 USD en 7 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
This should be a difficult but fun project, I am confident that I can build it for you, we just need to align some details as to where is this simulation going to run, is it in a browser or desktop environment?
$112 USD en 5 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de KOREA, REPUBLIC OF
Gangdong-gu, Korea, Republic of
5,0
8
Forma de pago verificada
Miembro desde nov 8, 2020

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.