-
Notifications
You must be signed in to change notification settings - Fork 3
/
IFovAlgorithm.java
36 lines (33 loc) · 1022 Bytes
/
IFovAlgorithm.java
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
36
/*
* Copyright (c) 2017, Fabio Ticconi, [email protected]
* Copyright (c) 2013, kba
* All rights reserved.
*/
package rlforj.los;
import rlforj.IBoard;
/**
* An interface for FOV algorithms.
*
* @author sdatta
*/
public interface IFovAlgorithm
{
/**
* All locations of Board b that are visible
* from (x, y) will be visited, ie b.visit(x, y)
* will be called on them.
* <p>
* Algorithms must call visit on the same location only once.
* Algorithms should try to visit points closer to the
* starting point before farther points.
* Algorithms should try to visit a location before calling isObstacle
* on it, allowing effects like an explosion destroying a wall and affecting
* areas beyond it.
*
* @param b The target board
* @param x Starting location:x
* @param y Starting location:y
* @param distance How far can this Field of View go
*/
void visitFoV(IBoard b, int x, int y, int distance);
}