Commit 8057741e authored by Ahmad Reza Cheraghi's avatar Ahmad Reza Cheraghi
Browse files

added get_color method that returns the color of matter in a integer value and...

added get_color method that returns the color of matter in a integer value and not as rgb color code!
parent 8d8591f6
......@@ -168,9 +168,19 @@ class Matter():
self.color = color_map[color]
else:
self.color = color
self.touch()
self.touch()
def get_color(self):
"""
Sets the location color
:param color: Location color
:return: None
"""
for color, code in color_map.items(): # for name, age in dictionary.iteritems(): (for Python 2.x)
if code == self.color:
return(color)
def touch(self):
"""Tells the visualization that something has been modified and that it shoud changed it"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment