Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. Consider the following code fragments which initialize and update variables for a small sprite moving in an unusual gravitational field across a 200 by

image text in transcribed
5. Consider the following code fragments which initialize and update variables for a small sprite moving in an unusual gravitational field across a 200 by 200 pixel window. //Initialization (run once) int x = 180; int y = 20; int dx = -20; int dy = 20; 1/ Position and Velocity Update (run each frame) x += dx; y += dy; dy -= 10; a)(4 pts) Where on the window (i.e. top-left comer, bottom edge, etc.) is the sprite initially located? b)(4 pts) Which direction is the sprite initially moving? c)(5 pts) Which boundary (top, bottom, right, or left side) will the sprite run into first

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions

Question

define EFFECTIVE PARTICIPATION

Answered: 1 week ago