-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjob.py
More file actions
53 lines (42 loc) · 1.81 KB
/
Copy pathjob.py
File metadata and controls
53 lines (42 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""Billy in the Fat Lane - A Lame Life Simulation Game
Copyright (C) 2013 Chris Parlette, Matt Parlette
This file is part of Billy in the Fat Lane.
Billy in the Fat Lane is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Billy in the Fat Lane is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Billy in the Fat Lane. If not, see http://www.gnu.org/licenses/."""
from uuid import uuid4
class Job:
def __init__(self,name = "Unnamed Job",
symbol = "!",
availability = 50,
pay = 1,
rank = 0,
location = None):
self.name = name
self.id = uuid4()
#Symbol: the command for a user to reference this job
self.symbol = symbol
#Availability: The percentage of openings for this job
#(100 is always available, 0 is never available)
self.availability = availability
#Pay: Pay per unit of time
self.pay = pay
#Rank: Where this job stands with regard to other jobs at its location
self.rank = rank
#Location: The location of this job
self.location = location
def __repr__(self):
return str(self.name)
def __eq__(self,other):
return self.id == other.id if hasattr(other,"id") else False
def __gt__(self,other):
return self.rank > other.rank if hasattr(other,"rank") else False
def __lt__(self,other):
return self.rank < other.rank if hasattr(other,"rank") else False