```
using System;
using System.Collections.Generic;
using UnityEngine;
using Random = UnityEngine.Random;

public class TetraManager : MonoBehaviour
{
    public GameObject[] tetraPrefabs;
    private float m_speed = 4f;
    private float gridSize = 1f;

    private float gridLeftBound = -4f;
    private float gridRightBound = 4f;
    private float gridBottomBound = -9f;
    private float gridTopBound = 10f;

    private List<GameObject> placedTetras = new List<GameObject>();
    private GameObject activeTetra;
    private float moveTimer;

    void Start()
    {
        SpawnTetra();
        moveTimer = 0f;
    }

    void Update()
    {
        if (activeTetra != null)
        {
            moveTimer += Time.deltaTime;

            if (moveTimer >= 1f / m_speed)
            {
                MoveTetraDown();
                moveTimer = 0f;
            }

            if (Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.LeftArrow))
            {
                MoveLeft();
            }

            if (Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.RightArrow))
            {
                MoveRight();
            }
        }
    }

    void MoveTetraDown()
    {
        if (activeTetra == null) return;

        Vector3 newPosition = activeTetra.transform.position;
        newPosition.y -= gridSize;

        if (IsValidMove(newPosition))
        {
            activeTetra.transform.position = newPosition;
        }
        else
        {
            PlaceTetra();
            SpawnTetra();
        }
    }

    void SpawnTetra()
    {
        if (tetraPrefabs.Length == 0)
        {
            Debug.LogError("No tetra prefabs defined in the array.");
            return;
        }

        int randomIndex = Random.Range(0, tetraPrefabs.Length);
        GameObject tetraPrefab = tetraPrefabs[randomIndex];

        Vector3 spawnPosition = new Vector3(
            Mathf.Round(transform.position.x / gridSize) * gridSize,
            Mathf.Round(transform.position.y / gridSize) * gridSize,
            0);
        
        BoxCollider2D prefabCollider = tetraPrefab.GetComponent<BoxCollider2D>();
        if (prefabCollider != null)
        {
            float tetraHeight = prefabCollider.bounds.size.y;

            switch (randomIndex)
            {
                case 0:
                    gridRightBound = 5f;
                    spawnPosition.y -= tetraHeight / 3.9f;
                    break;
                case 1:
                case 2:
                case 4:
                    gridRightBound = 4f;
                    spawnPosition.y -= tetraHeight / 5.5f;
                    break;
                case 3:
                    gridRightBound = 4f;
                    spawnPosition.y -= Mathf.Round(tetraHeight / 4f);
                    break;
            }
        }

        activeTetra = Instantiate(tetraPrefab, spawnPosition, Quaternion.identity);
    }
    
    void MoveLeft()
    {
        if (activeTetra == null) return;

        Vector3 newPosition = activeTetra.transform.position;
        newPosition.x -= gridSize;

        if (IsValidMove(newPosition))
        {
            activeTetra.transform.position = newPosition;
        }
    }

    void MoveRight()
    {
        if (activeTetra == null) return;

        Vector3 newPosition = activeTetra.transform.position;
        newPosition.x += gridSize;

        if (IsValidMove(newPosition))
        {
            activeTetra.transform.position = newPosition;
        }
    }

    bool IsValidMove(Vector3 position)
    {
        return IsWithinGrid(position) && !IsColliding(position);
    }

    bool IsWithinGrid(Vector3 position)
    {
        return position.x >= gridLeftBound && position.x <= gridRightBound &&
               position.y >= gridBottomBound && position.y <= gridTopBound;
    }

    bool IsColliding(Vector3 position)
    {
        Bounds activeBounds = GetTetraBounds(activeTetra, position);

        foreach (GameObject placedTetra in placedTetras)
        {
            Bounds placedBounds = GetTetraBounds(placedTetra, placedTetra.transform.position);

            if (activeBounds.Intersects(placedBounds))
            {
                return true;
            }
        }
        return false;
    }
    
    Bounds GetTetraBounds(GameObject tetra, Vector3 position)
    {
        BoxCollider2D collider = tetra.GetComponent<BoxCollider2D>();
        if (collider != null)
        {
            Bounds bounds = collider.bounds;
            bounds.center = position; // Adjust bounds to new position
            return bounds;
        }
        return new Bounds(position, Vector3.one * gridSize);
    }

    void PlaceTetra()
    {
        if (activeTetra != null)
        {
            placedTetras.Add(activeTetra);
            activeTetra = null;
        }
    }
}

```

how to change the code so the box box and poly collider is the one that stops the tetra piece on top of it (on top of it only)