-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathJsese.java
More file actions
35 lines (30 loc) · 805 Bytes
/
Jsese.java
File metadata and controls
35 lines (30 loc) · 805 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
package esi18;
import battleship.core.*;
import java.util.List;
/*
* SimpleShip
* @author Your Name
*/
public class Jsese extends Ship {
public Jsese() {
this.initializeName("Asian Sensation");
this.initializeOwner("Jesse Sese");
this.initializeHull(1);
this.initializeFirepower(4);
this.initializeSpeed(0);
this.initializeRange(5);
}
/*
* Determines what actions the ship will take on a given turn
* @param arena (Arena) the battlefield for the match
* @return void
*/
@Override
protected void doTurn(Arena arena) {
this.move(arena, Direction.EAST);
Coord location = this.getCoord();
int x = location.getX();
int y = location.getY();
this.fire(arena, x+5, y);
}
}