-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyStrategy.java
More file actions
29 lines (24 loc) · 817 Bytes
/
MyStrategy.java
File metadata and controls
29 lines (24 loc) · 817 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
import model.*;
public final class MyStrategy implements Strategy
{
boolean alreadyPrint = false;
@Override
public void move(Wizard self, World world, Game game, Move move)
{
long startTime = System.currentTimeMillis();
DebugHelper.initialize();
DebugHelper.beginPost();
if (!alreadyPrint)
{
System.out.println(game.getRandomSeed());
alreadyPrint = true;
}
Behaviour.getInstance().handleTick(self, world, game, move);
long stopTime = System.currentTimeMillis();
long elapsedTime = stopTime - startTime;
DebugHelper.addLabel("Frame time", elapsedTime);
DebugHelper.addLabel("Random seed", game.getRandomSeed());
DebugHelper.sendLabels();
DebugHelper.endPost();
}
}