Package fr.formiko.formiko
Class GCase
java.lang.Object
fr.formiko.formiko.GCase
- All Implemented Interfaces:
Serializable
A Groups of squares with most of the map items.
- Author:
- Hydrolien
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate int
asX
(int x) Check that it's a correct x.private int
asY
(int y) Check that it's a correct y.fr.formiko.usual.structures.listes.Liste<Case>
getCasesBetween
(int x1, int y1, int x2, int y2) Give all Case in a rectangle as a list.fr.formiko.usual.structures.listes.Liste<Case>
getCasesBetween
(CCase center, int radius) Give all Case in a rectangle as a list.fr.formiko.usual.structures.listes.Liste<Case>
getCasesBetween
(CCase from, CCase to) Give all Case in a rectangle as a list.getCCase
(int x, int y) getCCase
(fr.formiko.usual.Point p) getDim()
getFirst()
getHead()
int
int
getWidth()
int
length()
void
Set types for all squares from String[] as a csv file.toString()
void
Play a turn for all squares.
-
Field Details
-
actuelle
-
ccases
-
width
private int width -
height
private int height
-
-
Constructor Details
-
GCase
public GCase(int width, int height) -
GCase
public GCase(int taille) -
GCase
public GCase()
-
-
Method Details
-
getHead
-
getFirst
-
getDim
-
toString
-
getCCase
-
getCCase
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
length
public int length() -
getCCaseAlléa
-
setTypes
Set types for all squares from String[] as a csv file. -
tourCases
public void tourCases()Play a turn for all squares. -
asX
private int asX(int x) Check that it's a correct x.
If it's not it will be set at max or min value. -
asY
private int asY(int y) Check that it's a correct y.
If it's not it will be set at max or min value. -
getCasesBetween
public fr.formiko.usual.structures.listes.Liste<Case> getCasesBetween(int x1, int y1, int x2, int y2) Give all Case in a rectangle as a list.- Parameters:
x1
- x of the 1a Squarey1
- y of the 1a Squarex2
- x of the 2a Squarey2
- y of the 2a Square
-
getCasesBetween
Give all Case in a rectangle as a list.- Parameters:
from
- 1a corner of the rectangleto
- 2a corner of the rectangle
-
getCasesBetween
Give all Case in a rectangle as a list.- Parameters:
center
- of the rectangleradius
- distance with the wall of the rectangle
-