public class MapArea extends Object
Constructor and Description |
---|
MapArea(int abscissa,
int ordinate)
The basic constructor, will create a matrix corresponding to the max abscissa and ordinate given.
|
Modifier and Type | Method and Description |
---|---|
int |
getCoordinate(int a,
int o)
return the value at the x,y coordinate.
|
int[][] |
getMatrix() |
int |
getMaxAbscissa() |
int |
getMaxOrdinate() |
String |
getRepresentation()
Return a representation of the map edited by the detectors of the mowers.
|
void |
setCoordinate(int a,
int o,
int value)
Set the value at the x,y coordinate.
|
public MapArea(int abscissa, int ordinate)
abscissa
- the width of the matrixordinate
- the height of the matrixpublic int getCoordinate(int a, int o)
a
- the abscissa to fetcho
- the ordinate to fetchpublic void setCoordinate(int a, int o, int value)
a
- the abscissa to seto
- the ordinate to setvalue
- the value to setpublic String getRepresentation()
public int[][] getMatrix()
public int getMaxOrdinate()
public int getMaxAbscissa()
Copyright © 2016. All Rights Reserved.