-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlaca.java
More file actions
41 lines (33 loc) · 772 Bytes
/
Placa.java
File metadata and controls
41 lines (33 loc) · 772 Bytes
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
import java.awt.Color;
public class Placa implements ElementoMapa {
private Color cor;
private Character simbolo;
public Placa(Character simbolo, Color cor) {
this.simbolo = simbolo;
this.cor = cor;
}
@Override
public Character getSimbolo() {
return simbolo;
}
@Override
public Color getCor() {
return cor;
}
@Override
public boolean podeSerAtravessado() {
return true;
}
@Override
public boolean podeInteragir() {
return true;
}
@Override
public boolean aposInteracao() {
return false;
}
@Override
public String interage() {
return "Parece que há um tipo de árvore diferente. Tente usar seu machado!";
}
}