Back to project page androidtbsgame.
The source code is released under:
MIT License
If you think the Android project androidtbsgame listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.mmssb.androidtbsgame.andengine.entities.board; // w w w.j a v a2 s . c o m /** * Cell Shape - Is going to be extended soon * * @author Manu * */ public class Cell { public enum CellType { PLAIN, FOREST, MOUNTAIN, RIVER } private CellType cellType; /** * Creates an instance of {@link Cell} * * @param cellType * the cell's type */ public Cell(CellType cellType) { this.cellType = cellType; } /** * @return the value, which is subtracted from the amount of steps a unit * can do that turn when entering this cell */ public int getMovementSubtractionValue() { switch (cellType) { case PLAIN: return 1; case FOREST: return 2; case MOUNTAIN: return 3; case RIVER: return 1; default: return -1; } } public CellType getCellType() { return cellType; } public void setCellType(CellType cellType) { this.cellType = cellType; } }