icfp-model/src/main/java/ru/bosony/model/mine/Cell.java
author indvdum (gotoindvdum[at]gmail[dot]com)
Tue, 17 Jul 2012 21:38:39 +0400
branchCleverSearch
changeset 50 9530f55e9639
parent 22 a46d0179df7a
permissions -rw-r--r--
Moar
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@50
    39
	@Override
indvdum@50
    40
	public String toString() {
indvdum@50
    41
		return "Cell [coordinate=" + coordinate + ", content=" + content + "]";
indvdum@50
    42
	}
indvdum@50
    43
indvdum@6
    44
}