-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHuman.java
More file actions
112 lines (107 loc) · 4.52 KB
/
Human.java
File metadata and controls
112 lines (107 loc) · 4.52 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Agents;
import Functions.CognitiveFunction;
import Functions.Fe;
import Functions.Fi;
import Functions.Ne;
import Functions.Ni;
import Functions.Se;
import Functions.Si;
import Functions.Te;
import Functions.Ti;
import jade.core.Agent;
/**
* Class representing a human being
* @author Hawlink
*/
public class Human extends Agent {
private String tag;
private CognitiveFunction dominantFunction;
private CognitiveFunction secondaryFunction;
private CognitiveFunction tertiaryFunction;
private CognitiveFunction inferiorFunction;
@Override
protected void setup(){
Object[] args = this.getArguments();
if (args != null && args.length > 0){
this.tag = (String)args[0];
}
initializeFunctions();
System.out.println("I'm alive and " + this.tag);
}
void initializeFunctions(){
switch(this.tag){
case "INTJ" :
dominantFunction = new Ni(100); secondaryFunction = new Te(75);
tertiaryFunction = new Fi(50); inferiorFunction = new Se(25);
break;
case "INTP" :
dominantFunction = new Ti(100); secondaryFunction = new Ne(75);
tertiaryFunction = new Si(50); inferiorFunction = new Fe(25);
break;
case "ENTJ" :
dominantFunction = new Te(100); secondaryFunction = new Ni(75);
tertiaryFunction = new Se(50); inferiorFunction = new Fi(25);
break;
case "ENTP" :
dominantFunction = new Ne(100); secondaryFunction = new Ti(75);
tertiaryFunction = new Fe(50); inferiorFunction = new Si(25);
break;
case "INFJ" :
dominantFunction = new Ni(100); secondaryFunction = new Fe(75);
tertiaryFunction = new Ti(50); inferiorFunction = new Se(25);
break;
case "INFP" :
dominantFunction = new Fi(100); secondaryFunction = new Ne(75);
tertiaryFunction = new Si(50); inferiorFunction = new Te(25);
break;
case "ENFJ" :
dominantFunction = new Fe(100); secondaryFunction = new Ni(75);
tertiaryFunction = new Se(50); inferiorFunction = new Ti(25);
break;
case "ENFP" :
dominantFunction = new Ne(100); secondaryFunction = new Fi(75);
tertiaryFunction = new Te(50); inferiorFunction = new Si(25);
break;
case "ISTJ" :
dominantFunction = new Si(100); secondaryFunction = new Te(75);
tertiaryFunction = new Fi(50); inferiorFunction = new Ne(25);
break;
case "ISFJ" :
dominantFunction = new Si(100); secondaryFunction = new Fe(75);
tertiaryFunction = new Ti(50); inferiorFunction = new Ne(25);
break;
case "ESTJ" :
dominantFunction = new Te(100); secondaryFunction = new Si(75);
tertiaryFunction = new Ne(50); inferiorFunction = new Fi(25);
break;
case "ESFJ" :
dominantFunction = new Fe(100); secondaryFunction = new Si(75);
tertiaryFunction = new Ne(50); inferiorFunction = new Ti(25);
break;
case "ISTP" :
dominantFunction = new Ti(100); secondaryFunction = new Se(75);
tertiaryFunction = new Ni(50); inferiorFunction = new Fe(25);
break;
case "ESFP" :
dominantFunction = new Se(100); secondaryFunction = new Fi(75);
tertiaryFunction = new Te(50); inferiorFunction = new Ni(25);
break;
case "ESTP" :
dominantFunction = new Se(100); secondaryFunction = new Ti(75);
tertiaryFunction = new Fe(50); inferiorFunction = new Ni(25);
break;
case "ISFP" :
dominantFunction = new Fi(100); secondaryFunction = new Se(75);
tertiaryFunction = new Ni(50); inferiorFunction = new Te(25);
break;
default :
doDelete();
break;
}
}
}