icfp-model/src/main/java/ru/bosony/model/mine/Cell.java
author indvdum (gotoindvdum[at]gmail[dot]com)
Mon, 16 Jul 2012 13:10:14 +0400
changeset 42 2bd032a701a7
parent 22 a46d0179df7a
child 50 9530f55e9639
permissions -rw-r--r--
Add solver based on Dijkstra algorithm
indvdum@6
     1
package ru.bosony.model.mine;
indvdum@6
     2
indvdum@6
     3
import ru.bosony.model.cellscontents.CellContent;
indvdum@22
     4
import ru.bosony.model.moving.Coordinate;
indvdum@6
     5
indvdum@6
     6
/**
indvdum@6
     7
 * @author indvdum (gotoindvdum[at]gmail[dot]com) <br>
indvdum@6
     8
 *         13.07.2012 22:10:18
indvdum@6
     9
 * 
indvdum@6
    10
 */
indvdum@22
    11
public class Cell implements Cloneable {
indvdum@6
    12
indvdum@7
    13
	protected Coordinate	coordinate;
indvdum@6
    14
	protected CellContent	content;
indvdum@6
    15
indvdum@7
    16
	public Cell(Coordinate coordinate, CellContent content) {
indvdum@7
    17
		this.coordinate = coordinate;
indvdum@6
    18
		this.content = content;
indvdum@6
    19
	}
indvdum@6
    20
indvdum@6
    21
	public CellContent getContent() {
indvdum@6
    22
		return content;
indvdum@6
    23
	}
indvdum@6
    24
indvdum@6
    25
	public void setContent(CellContent content) {
indvdum@6
    26
		this.content = content;
indvdum@6
    27
	}
indvdum@6
    28
indvdum@7
    29
	public Coordinate getCoordinate() {
indvdum@7
    30
		return coordinate;
indvdum@6
    31
	}
indvdum@6
    32
indvdum@22
    33
	@Override
indvdum@22
    34
	protected Cell clone() throws CloneNotSupportedException {
indvdum@22
    35
		Cell clone = new Cell(coordinate, content);
indvdum@22
    36
		return clone;
indvdum@22
    37
	}
indvdum@22
    38
indvdum@6
    39
}