10th May 2019, 11:31 AM
Omar
Omar - avatar
10 ответов
+ 9
Could you put it in a sololearn python file and tag that here? Also, where is your soldier class file?
10th May 2019, 12:22 PM
Nathan Lewis
Nathan Lewis - avatar
+ 8
Show us please
10th May 2019, 11:46 AM
Nathan Lewis
Nathan Lewis - avatar
+ 7
Show us an attempt, and if you sill don’t get it we can help you through(:
10th May 2019, 11:35 AM
Nathan Lewis
Nathan Lewis - avatar
+ 4
This is a nice task but doing this properly will take at least a day.
10th May 2019, 1:05 PM
Thoq!
Thoq! - avatar
+ 4
We will not tell you the code, it looks like you’ve barely scratched the surface of this task. I would suggest taking the Python Class tutorial again to make sure your syntax is correct and initialize your proper variables. The Q&A is here for specific and direct questions, we are not here to write your code for you
10th May 2019, 1:33 PM
Nathan Lewis
Nathan Lewis - avatar
+ 4
This is the kind of task you should start with a proper class diagram that shows the attributes of the classes and how they connect to each other and only after that you should start coding. lucidchart.com is nice for that but you can just do it with pen and paper. I think I would implement one base class "Character" for all characters (living and not living), "split" that into the three classes proposed in the assignment "Vehicle", "Animal" and "Person" (instead of People which sounds pretty bad). Under Person you can put your soldier classes. Then you need a class "Game" where you need to implement the players, the characters owned by the players and methods like start_game, play_move etc. And then I would use a main_function to actually call the classes etc. It is a lot to do. How much time do you have for finishing it?
10th May 2019, 1:37 PM
Thoq!
Thoq! - avatar
0
Nathan Lewis i did maaaany attempts yesterday and i still not have the answer
10th May 2019, 11:42 AM
Omar
Omar - avatar
0
Nathan Lewis from solider import solider class Engineer(): def __init__(self, kind = "technician"): self.kind = kind super().__init__() def repairer(self): return ("I am reparing") def __str__(self): return Engineer .format(self.kind, self.repairer ,solider()) from solider import solider class Doctor(): def __init__(self, kind = "Teeth"): self.kind = kind super().__init__() def heals(self): return ("I am heals") def __str__(self): return Doctor .format(self.kind, self.heals ,solider()) from solider import solider class Commanders(): def __init__(self, kind = "arm"): self.kind = kind super().__init__() def defends(self): return ("I am defends") def __str__(self): return Commanders .format(self.kind, self.defends ,solider())
10th May 2019, 11:59 AM
Omar
Omar - avatar
0
On my computer
10th May 2019, 12:48 PM
Omar
Omar - avatar
0
Thoq! Ok but can you do it please tell me the code?
10th May 2019, 1:07 PM
Omar
Omar - avatar