package com.kduda.battleships.models.board;

import com.kduda.battleships.models.Position;
import com.kduda.battleships.models.units.Unit;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;


public class Cell extends Rectangle {
    public final Position POSITION;
    private final Board BOARD;
    public Unit unit = null;
    public boolean wasShot = false;

    public Cell(int x, int y, Board board) {
        super(40, 40);

        this.BOARD = board;

        this.POSITION = new Position(x, y);

        setStartingFillColor(y);

        setStroke(Color.BLACK);
    }

    private void setStartingFillColor(int y) {
        if (y > 11)
            setFill(Color.SANDYBROWN);
        else
            setFill(Color.BLUE);
    }

    public boolean shootCell() {
        wasShot = true;
        setFill(Color.GRAY);

        if (unit != null) {
            unit.hit();
            setFill(Color.RED);
            if (!unit.isAlive()) {
                BOARD.units--;
            }
            return true;
        }
        return false;
    }


}

@@ -278,16 +278,48 @@
 SITION;%0A
+    public final CellType TYPE;%0A
     priv
@@ -480,37 +480,8 @@
 );%0A%0A
-        this.BOARD = board;%0A%0A
     
@@ -516,33 +516,32 @@
 tion(x, y);%0A
-%0A
         
 setStartingF
@@ -532,139 +532,185 @@
     
-setStartingFillColor(y);%0A%0A        setStroke(Color.BLACK)
+this.BOARD = board;%0A%0A        if (y %3E 11) %7B%0A            this.TYPE = CellType.Land
 ;%0A    
-%7D%0A%0A
     
-private void setStarting
+    set
 Fill
+(
 Color
-(int y) %7B%0A        if (y %3E 11)
+.SANDYBROWN);%0A        %7D else %7B%0A            this.TYPE = CellType.Water;
 %0A   
@@ -728,34 +728,28 @@
 tFill(Color.
-SANDYBROWN
+BLUE
 );%0A        e
@@ -751,17 +751,11 @@
     
-else%0A    
+%7D%0A%0A
     
@@ -753,36 +753,38 @@
   %7D%0A%0A        set
-Fill
+Stroke
 (Color.BLUE);%0A  
@@ -772,26 +772,27 @@
 oke(Color.BL
-UE
+ACK
 );%0A    %7D%0A%0A  
@@ -785,24 +785,25 @@
 CK);%0A    %7D%0A%0A
+%0A
     public b

Add cell type