Grid UML

---
config:
  theme: forest
---
classDiagram
    Grid --|> GameObjectList
    Grid *-- GridCell
    class Grid {
        - Int _rows
        - Int _columns
        - Int _cellSpacing
        - Vector2 origin
        - float _bottomRowY
        - Int _bottomRowIndex
        - InitializeGrid() void
        - SpawnBall() void
        - CheckCollision() void
        - CollisionLogic() void
        - GetBottomRow() float
        - CheckForWinner() void
        - RotateGrid() void
        - ReinitializeGrid() void

    }

    GridCell --|> RotatingSpriteGameObject
    class GridCell{
        + string cellState
        + bool bottomRow
        + DetectBottomRow() void
        + Rotate() void
    }

    class RotatingSpriteGameObject{
        + float Angle
        + float Degrees
        + Update() void
    }


    class GameObjectList {
        + Add()
        + Update()
        + Draw(GameTime gameTime, SpriteBatch spriteBatch) void
    }

    class SpriteGameObject {
        + CollidesWith() bool
        + Draw(GameTime gameTime, SpriteBatch spriteBatch) void
    }

    BallObject --|> SpriteGameObject
    Grid *-- BallObject
    class BallObject{
        + bool falling
        + Update() void
    }

Last update: May 21, 2025