summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/engine/Attack.java
blob: dd345a3bcc37469a2f198402a71eb491105f3482 (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.rustanddust.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;
    }
}