package com.example.pac.pacman;

import android.graphics.Canvas;
import android.graphics.Rect;

public class Ghost extends Character {

    private IMoveStrategy _moveStrategy;

    protected Ghost(int color, String name, String nickName, Labyrinth labyrinth, IMoveStrategy moveStrategy) {
        super(name, nickName, labyrinth);
        _foreground.setColor(color);
        _moveStrategy = moveStrategy;
    }

    @Override
    public void init() {
        super.init();
        Rect bounds = _labyrinth.getBounds();
        _x = bounds.left + _labyrinth.getCellSize() + _labyrinth.getCellSize()/2;
        _y = bounds.top  + _labyrinth.getCellSize() + _labyrinth.getCellSize()/2;
        _foreground.setTextSize(_size);
    }

    @Override
    public void draw(Canvas canvas) {
        canvas.drawText("G", _x, _y, _foreground);
    }

    @Override
    public void move() {
        Direction direction = _moveStrategy.getNextDirection(_x, _y);
        super.move(direction);
    }
}
@@ -87,16 +87,47 @@
 cs.Rect;
+%0Aimport android.graphics.RectF;
 %0A%0Apublic
@@ -393,16 +393,51 @@
 color);%0A
+        _foreground.setAlpha(150);%0A
         
@@ -748,48 +748,8 @@
 /2;%0A
-        _foreground.setTextSize(_size);%0A
     
@@ -815,35 +815,138 @@
     
-canvas.drawText(%22G%22, _x, _y
+float radius = _size/2;%0A        RectF r = new RectF(_x - radius, _y - radius, _x + radius, _y + radius);%0A        canvas.drawRect(r
 , _f

change ghost look like