Question: No Control Flow allowed for this lecture question! -We will simulate some character behavior in a platforming game where the player can run, duck, and

No Control Flow allowed for this lecture question! -We will simulate some character behavior in a platforming game where the player can run, duck, and stand still In a package named oop.platformer write a class named Player with the following functionality Lecture Question Methods: duck(): Unit Enters the ducking state. Cannot transition from running to ducking standStill(): Unit Enters the standing state run(): Unit Enters the running state. Cannot transition from ducking to running jumpHeight(): Int Returns 4 if ducking, 3 if standing, and 6 if running movementSpeed(): Int Returns 1 if ducking, 5 if standing, and 12 if running The initial state of the Player is standing

Create a package name tests and class TestStates and test all methods

Language: Scala

explain every step thanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!