Question: Please make sure that the code works and specify the purpose for which you wrote the codes. ( PYTHON ) mport numpy import pandas class
Please make sure that the code works and specify the purpose for which you wrote the codes.PYTHON
mport numpy
import pandas
class InputErrorException:
pass
class Character:
Superclass for characters to be used in a new computer game releasing this year.
The game will be a strategyhorrorthriller game played on a coordinate system.
Each character has a coordinate tuple of integers indicating their position on the map.
def initself startingcoordinate: tuple:
Everything to be done whenever this object or an object inherited from it is created will be defined here.
self.currentposition startingcoordinate
def moveself movement: tuple:
General method to allow a character to change its position. It has no return value.
return NotImplementedError
def walkself direction: int:
The character will move unit in the specified direction on the coordinate system. It has no return value.
direction: up
right
down
left
return NotImplementedError
def jumpself direction: int:
The character wclass InputErrorException:
pass
class Character:
n
Superclass for characters to be used in a new computer game releasing this
The game will be a strategyhorrorthriller game played on a coordinate sys
Each character has a coordinate tuple of integers indicating their positi
def self startingcoordinate: tuple:
Everything to be done whenever this object or an object inherited from
self.currentposition startingcoordinate
def moveself movement: tuple:
General method to allow a character to change its position. It has no
return NotImplementedErro
def walkself direction: int:
The character will move unit in the specified direction on the coordi
direction: up
right
down
left
return NotImplementedError
def jumpself direction: int:
The character will move linearly units in the specified direction on
direction: up
right
down
left
return NotImplementedErrox
class PlayerCharacter
Defines the character controlled by the player in the game,
def self startingcoordinate: tuple:
n
Everything to be done whenever this object is created will be defined
The player character can jump a maximum of times during the game.
pass
def seeenemiesself enemylist: list int:
This method returns the number of enemies within a unit distance Eu
using the list containing all Enemy objects in the game.
return NotImplementedError
def jumpself direction: int bool:
If the player has enough jumping rights, they will jump and the rights
If they don't have any they cannot move.
Returns True if the posit darr, changes, False if it remains the same.
Returns True if the position changes, False if it remains the same.
direction: up
right
down
left
return NotImplementedError
def iscaughtself enemylist: list bool:
Returns True if the player is in the same position as any enemy gets c
return NotImplementedErrol
class Enemy Character:
Defines the characters controlled by the computer in the game.
def
initself startingcoordinate: tuple:
Everything to be done whenever this object is created will be defined h
pass
def moverandomlyself
The character selects one of the four directions with equal chance and
It has no return value.
return NotImplementedErro
def seeplayerself player: Player bool
Returns True if the distance between the enemy's position and the playe
False otherwise.
return NotImplementedError
def aimovementself player: Player:
n
If the Enemy sees the player, it moves towards the player; otherwise, i
It has no return value.
return NotImplementedError
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
