-
Notifications
You must be signed in to change notification settings - Fork 1
/
SensorExpr.java
43 lines (37 loc) · 910 Bytes
/
SensorExpr.java
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
package carin.parser.ast.expressions;
import carin.GameStates;
import carin.entities.GeneticEntity;
import java.util.Map;
public class SensorExpr implements Expr {
private final String cmd;
private final GameStates states;
// maybe change cmd to expr
public SensorExpr(String cmd, GameStates states) {
this.cmd = cmd;
this.states = states;
}
private int findVirus() {
return 0;
}
private int findAntibody() {
return 0;
}
private int findNearby() {
return 0;
}
@Override
public int evaluate(Map<String, Integer> var_map, GeneticEntity host) {
switch (cmd) {
case "virus":
break;
case "antibody":
//
break;
case "nearby":
//
break;
default:
}
return -1;
}
}