Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PacMan must move left to right across the screen. Upon reaching the right hand side, they must re - appear on the left - hand

PacMan must move left to right across the screen. Upon reaching the right hand side, they must re-appear on the left-hand side (and vice-versa). PacMan should start the animation in the center of a black 800 by 200 pixel window. PacMan must move along a track made from two blue lines 10 pixels in width. PacMan must swap directions when the space bar is pressed and must have a mouth animation that approximates the classic PacMan sprite.
Spread out in a line are pellets which PacMan can eat. Once a pellet is eaten the score goes up by one. The score is shown in the top left of the window.
One ghost is present in the play area. The ghost moves left or right and swaps direction randomly. The Ghost's starting location is also chosen randomly. The ghost moves slightly faster than PacMan. If PacMan hits the ghost, the game is lost and stops.
In particular locations are fruits. If PacMan eats a fruit, the ghost becomes harmless for a period of time. If PacMan hits a ghost while it is harmless, nothing happens,
Constraints
You cannot use any extra processing libraries or plugins.
You cannot use frameRate() or delay()
You cannot define your own classes or use built-in java classes
You cannot use multiple tabs or multiple files.
You cannot use transformations such as rotate, translate, scale etc.
You cannot use images or external fonts.
You cannot use arrayLists, IntLists, intDicts, FloatLists, FloatDict
image text in transcribed

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

3319712721, 978-3319712727

More Books

Students also viewed these Databases questions