Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
design_pattern
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ajil.k
design_pattern
Commits
fb23ae7e
Commit
fb23ae7e
authored
Feb 20, 2023
by
ajil.k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added
parent
8f156139
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
35 deletions
+12
-35
.idea/vcs.xml
.idea/vcs.xml
+6
-0
main.py
main.py
+6
-5
prototype.py
prototype.py
+0
-30
No files found.
.idea/vcs.xml
0 → 100644
View file @
fb23ae7e
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
main.py
View file @
fb23ae7e
...
@@ -34,13 +34,14 @@ base_character = Character("Character", health=100, speed=5, damage=10, skills=1
...
@@ -34,13 +34,14 @@ base_character = Character("Character", health=100, speed=5, damage=10, skills=1
# Creates a prototype object and register the base character
# Creates a prototype object and register the base character
prototype
=
CharacterPrototype
()
prototype
=
CharacterPrototype
()
prototype
.
create_character
(
"normal_character"
,
base_character
)
base_character_name
=
"normal_character"
prototype
.
create_character
(
base_character_name
,
base_character
)
# Creates
a new character
by cloning the base character and updating its attributes
# Creates
2 new characters
by cloning the base character and updating its attributes
four_star_character
=
prototype
.
clone
(
"normal_character"
,
speed
=
25
,
damage
=
2
5
)
four_star_character
=
prototype
.
clone
(
base_character_name
,
speed
=
20
,
damage
=
25
,
skills
=
1
5
)
five_star_character
=
prototype
.
clone
(
"normal_character"
,
health
=
125
,
speed
=
30
,
damage
=
5
0
)
five_star_character
=
prototype
.
clone
(
base_character_name
,
health
=
125
,
speed
=
30
,
damage
=
50
,
skills
=
2
0
)
# Printing the characters
# Printing the characters
print
(
"
Normal
Character attribute:
\n
"
,
base_character
)
print
(
"
Base
Character attribute:
\n
"
,
base_character
)
print
(
"4 STAR Character attribute:
\n
"
,
four_star_character
)
print
(
"4 STAR Character attribute:
\n
"
,
four_star_character
)
print
(
"5 STAR Character attribute:
\n
"
,
five_star_character
)
print
(
"5 STAR Character attribute:
\n
"
,
five_star_character
)
prototype.py
deleted
100644 → 0
View file @
8f156139
import
pyttsx3
# initialize the engine
engine
=
pyttsx3
.
init
()
# set the voice
voices
=
engine
.
getProperty
(
'voices'
)
engine
.
setProperty
(
'voice'
,
voices
[
1
]
.
id
)
# say the text
engine
.
say
(
"Let's Enjoy the moment."
)
# run the engine
engine
.
runAndWait
()
# from gtts import gTTS
# import os
#
# # Specify the Malayalam text to be spoken
# text = "ഷിബിലി നീ എന്ത് ചെയ്യുന്നു"
#
# # Create a gTTS object and specify the language as Malayalam
# tts = gTTS(text=text, lang='ml')
#
# # Save the audio as mp3 file
# tts.save("malayalam_audio.mp3")
#
#
# # Use the default media player to play the audio file
# os.system("start malayalam_audio.mp3")
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment