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
     1 package ru.bosony.model.mine;
     2 
     3 import ru.bosony.model.cellscontents.CellContent;
     4 import ru.bosony.model.moving.Coordinate;
     5 
     6 /**
     7  * @author indvdum (gotoindvdum[at]gmail[dot]com) <br>
     8  *         13.07.2012 22:10:18
     9  * 
    10  */
    11 public class Cell implements Cloneable {
    12 
    13 	protected Coordinate	coordinate;
    14 	protected CellContent	content;
    15 
    16 	public Cell(Coordinate coordinate, CellContent content) {
    17 		this.coordinate = coordinate;
    18 		this.content = content;
    19 	}
    20 
    21 	public CellContent getContent() {
    22 		return content;
    23 	}
    24 
    25 	public void setContent(CellContent content) {
    26 		this.content = content;
    27 	}
    28 
    29 	public Coordinate getCoordinate() {
    30 		return coordinate;
    31 	}
    32 
    33 	@Override
    34 	protected Cell clone() throws CloneNotSupportedException {
    35 		Cell clone = new Cell(coordinate, content);
    36 		return clone;
    37 	}
    38 
    39 	@Override
    40 	public String toString() {
    41 		return "Cell [coordinate=" + coordinate + ", content=" + content + "]";
    42 	}
    43 
    44 }