@startuml
package Game <<Folder>> {
  package Cards <<Folder>> {
    abstract class Card {
      {static}- frameBitmap : Bitmap
      --
      + Card(String UID,Context c)
      + onCardAttack(Board board,Card enemy) : void
      + onCardPlayed(Board board, Player p) : void
      + onCardDeath(Board board) : void
      + onTurnBegin(Board board) : void
      + getFrameBitmap(Context c) : Bitmap
      + getFrameTexture() : int
      {abstract}+ getCardPicture() : int
      + getColor() : String
      {abstract}+ getDescription() : String
      {abstract}+ getAttack() : int
      {abstract}+ getHealth() : int
      + setDrawableCard(DrawableCard drawableCard) : void
      + getDrawableCard() : DrawableCard
      {abstract}+ getName() : String
    }
    class DemoCard {
      --
      + DemoCard(String UID, Context c)
      + getCardPicture() : int
      + getColor() : String
      + getDescription() : Sting
      + getAttack() : int
      + getHealth() : int
      + getName() : String
    }
    class PlayableZonesHandler
    {
       --
       + PlayableZonesHandler(Board board)
       + displayPlayableZones(Renderer renderer)
       + displayPlayableZonesOn(int i,Renderer renderer)
       + hidePlayableZones(Renderer renderer)
    }
  }
  class Hand
  {
    --
    +Hand()
    +pickCardFromDeck(Deck deck,int amount)
    +fillHand(Deck deck)
  }
  class TouchHandler
  {
    - TouchDeltaX : float
    - TouchDeltaY : float
    - originalPositionX : float
    - originalPositionY : float
  }
  class GameActivity
  {
    + onCreate()
    + setGameEngine()
    + onTouchEvent(MotionEvent event)
    + isMultiplayer()
  }
  class GameLogicThread
  {
    - Context cont
    - boolean ready
    --
    + GameLogicThread(GameActivity gameActivity, Renderer renderer)
    + run()
    + drawHandPreview()
    + onFrameDoneRendering()
    + isReady()
    + onTouchEvent(MotionEvent event)
  }
  class Board
  {
    --
    + Board()
    + playCard() : boolean
    + getPlayerCardsOnBoard() : Card[]
  }
  package Decks <<Folder>>
  {
    abstract class Deck
    {
      --
      +shuffle()
      + abstract getDeckName()
    }
    class DeckDemo
    {
      --
      + DeckDemo(String id,Context context)
      + getCards() : Stack<Card>
      {abstract}+ getDeckName() : String
    }
  }
}


package Video <<Folder>> {
  package Drawables <<Folder>> {
    abstract class Drawable {
      - x : float
      - y : float
      - name : String
      - bitmap : Bitmap
      - p : Paint
      --
      # Drawable(float x,float y,String name)
      + drawOn(Canvas c,Paint p) : void
      + equals(Object o) : boolean
      + setCoordinates(float x, float y) : void
      # checkPaint() : void
      # setBitmap(Bitmap bitmap) : void
    }
    class DrawableRectangle
    {
      + DrawableRectangle(Rectangle rectangle, String name, int color)
      + DrawableRectangle(Bitmap bitmap,Rectangle rectangle, String name, int color)
    }
    class DrawableBitmap
    {
      + DrawableBitmap(Bitmap bitmap, float x_pos, float y_pos, String name, float x_size, float y_size)
    }
    class DrawableText
    {
      + DrawableText(String text,float x_pos,float y_pos,String name, float x_size,float y_size,float textSize , int x_canvasRatio, int y_canvasRatio)
      - cutText(int charPerLines,String text) : List<String>
    }
    abstract class DrawableCard
    {
     - ratio : int
     - onBoard : boolean
     - draggable : boolean
     --
     + DrawableCard(Card c, float x, float y, String name, Context context)
     + DrawableCard(Card c, float x, float y, String name, Context context,int ratio)
     + DrawableCard(DrawableCard smallCArd, Context cont,int ratio)
     + updateHpAndAtk(Integer atk,Integer hp)
     - removeAlpha(String color)
     + drawOn(Canvas c, Paint p)
     + setCoordinates(float x, float y)
     + setOnBoard(Boolean onBoard)
    }
  }
  class Renderer {
    - holder : SurfaceHolder
    - p : Paint
    - needToUpdate : boolean
    --
    + Renderer(Context context,GameActivity gameActivity)
    + surfaceCreated(SurfaceHolder holder) : void
    + surfaceChanged(urfaceHolder surfaceHolder, int i, int i1, int i2) : void
    + surfaceDestroyed(SurfaceHolder surfaceHolder) : void
    + onDraw(Canvas canvas) : void
    + updateFrame() : void
    + addToDraw(Drawable newElement) : boolean
    + addToDrawWithoutUpdate(Drawable newElement) : boolean
    + moveToDraw(float x, float y, String name) : void
    + removeToDrawWithoutUpdate(String name) : void
    + removeToDrawWithoutUpdate(Drawable drawable) : void
    + removeToDraw(String name) : void
    + removeToDraw(Drawable toRemove) : void
    + getDrawAble(String name) : Drawable
    + getCardOn(float x, float y) : DrawableCard
    + setEngine(GameLogicThread engine) : void
  }
  class DrawingThread{
    -renderer Renderer
    +keepdrawing boolean
    --
    +DrawingThread(Renderer renderer)
    +run()
  }
  class RectangleCanevas {
    --
    + RectangleCanevas(Bitmap bitmap)
    + drawRect(Rectangle r, Paint paint) : void
  }
  class Rectangle {
     {static}+p : Paint;
     + positionX : float
     + positionY : float
     + width : float
     + height : float
     --
     + Rectange(float prostionX,float positionY,float width,float height)
     - set(float positionX,float positionY,float width,float height)
     + scaleRectangleToScreen() : void
     + bitmapRectangleBuilder(Bitmap bitmap, int color) : void
   }
}

class MainActivity {
    # onCreate()
}

MainActivity *-- GameActivity

Card <|-- DemoCard

Drawable <|-- DrawableCard
Drawable <|-- DrawableRectangle
Drawable <|-- DrawableBitmap
Drawable <|-- DrawableText

Renderer "1" *-- DrawingThread : -drawingThread
Renderer "1" *-- GameLogicThread : -engine
Renderer "*" *-- Drawable : toDraw

DrawableCard o-- Drawable : frameDrawable
DrawableCard *-- Drawable : OpacityRectangleDrawable
DrawableCard *-- Drawable : PictureDrawable
DrawableCard *-- Drawable : cardOnBoardDrawable
DrawableCard *-- Drawable : cardDescription
DrawableCard *-- Drawable : cardTitle
DrawableCard *-- Drawable : cardHpDrawable
DrawableCard *-- Drawable : cardAtkDrawable

TouchHandler *-- DrawableCard : moveEventCard



PlayableZonesHandler "*" *-- Drawable : playableZones
PlayableZonesHandler "1" *-- Board : board

DrawableCard o-- Card : card

DrawableCard "1" *-- "1" Rectangle : cardOnBoardFrame
DrawableCard "1" *-- "1" Rectangle : cardOnBoardAtk
DrawableCard "1" *-- "1" Rectangle : cardOnBoardHp

Card "1" *-- DrawableCard : drawableCard



Renderer "1" *-- "0_*" Drawable : toDraw

GameActivity "1" *-- "1" Renderer : renderer

GameLogicThread *-- TouchHandler : touchHandler
GameLogicThread o-- Renderer : renderer
GameLogicThread *-- Board : board
GameLogicThread *-- Deck : localPlayerDeck
GameLogicThread *-- Hand : fillHand
GameLogicThread *-- PlayableZonesHandler : playableZonesHandler
GameLogicThread *-- GameActivity : gameActivity

Deck <|-- DeckDemo

Renderer o-- GameLogicThread
@enduml