summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine/Attack.java
blob: bc99b67c3980399376f59f46d3d8f6851a431a39 (plain)
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
package ch.asynk.tankontank.engine;

public class Attack
{
    public Pawn attacker;
    public Pawn target;
    public int distance;
    public boolean isClear;
    public boolean isFlank;

    public Attack(Pawn attacker)
    {
        this.attacker = attacker;
    }

    public String toString()
    {
        return String.format("attack : %s -> %s dist:%d clear:%b flank:%b", attacker, target, distance, isClear, isFlank);
    }

    public void reset()
    {
        target = null;
        distance = 0;;
        isClear = false;
        isFlank = false;
    }
}