public class EuclideanAlgorithm extends Object implements IMoveAlgorithm
| Constructor and Description |
|---|
EuclideanAlgorithm() |
| Modifier and Type | Method and Description |
|---|---|
Direction |
whereShouldIGo(List<Point> snake,
Direction direction,
Point food,
int rows,
int columns)
Retorna a direção da cobra.
|
public Direction whereShouldIGo(List<Point> snake, Direction direction, Point food, int rows, int columns)
whereShouldIGo in interface IMoveAlgorithmsnake - lista de pontos ocupados pela cobra.direction - direção atual.food - ponto da comida.rows - número total de linhas.columns - número total de colunas.Copyright © 2017 Tecgraf/PUC-Rio. All rights reserved.