diff options
Diffstat (limited to 'src/esieequest/model/characters/Sumobot.java')
-rw-r--r-- | src/esieequest/model/characters/Sumobot.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/esieequest/model/characters/Sumobot.java b/src/esieequest/model/characters/Sumobot.java index c779ad8..fb4e7b3 100644 --- a/src/esieequest/model/characters/Sumobot.java +++ b/src/esieequest/model/characters/Sumobot.java | |||
@@ -3,8 +3,10 @@ package esieequest.model.characters; | |||
3 | import java.util.HashSet; | 3 | import java.util.HashSet; |
4 | import java.util.Random; | 4 | import java.util.Random; |
5 | 5 | ||
6 | import esieequest.model.Game; | ||
6 | import esieequest.model.map.Direction; | 7 | import esieequest.model.map.Direction; |
7 | import esieequest.model.map.Room; | 8 | import esieequest.model.map.Room; |
9 | import esieequest.view.Viewable; | ||
8 | 10 | ||
9 | /** | 11 | /** |
10 | * A Sumobot from ESIEEspace who says random sentences and moves randomly. | 12 | * A Sumobot from ESIEEspace who says random sentences and moves randomly. |
@@ -39,10 +41,10 @@ public class Sumobot extends MovingCharacter { | |||
39 | } | 41 | } |
40 | 42 | ||
41 | @Override | 43 | @Override |
42 | public String talk() { | 44 | public void talk(final Game game, final Viewable view) { |
43 | this.setCanMove(true); | 45 | this.setCanMove(true); |
44 | final int randomIndex = this.randomGenerator.nextInt(this.messages.size()); | 46 | final int randomIndex = this.randomGenerator.nextInt(this.messages.size()); |
45 | return (String) this.messages.toArray()[randomIndex]; | 47 | view.echo((String) this.messages.toArray()[randomIndex]); |
46 | } | 48 | } |
47 | 49 | ||
48 | } | 50 | } |