-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPorta.java
More file actions
41 lines (33 loc) · 770 Bytes
/
Porta.java
File metadata and controls
41 lines (33 loc) · 770 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 Porta implements ElementoMapa {
private Color cor;
private Character simbolo;
public Porta(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 false;
}
@Override
public boolean podeInteragir() {
return true;
}
@Override
public boolean aposInteracao() {
return false;
}
@Override
public String interage() {
return "Uma porta impede sua passagem! Aho que uma chave seria uma boa...";
}
}