unity – How to move game pieces in checkers?

I have been creating a 3D Checkers board game via Unity.

So far, I have managed to create the board game, with its game pieces well positioned into their designated rows and tiles upon starting to play.

The only problem that I am currently facing is the diagonal movement and how my game pieces are not restricted from moving into certain tiles in the game.

I had employed a code at which my game pieces will literally levitate upon being clicked or selected to play.

However, they just linger in the air without landing on the board.

Hovering piece

Here are the codes that I have employed for two classes, namely the Board Game & the Pieces.

Your help would be greatly appreciated.

Board Game

using System.Collections;
using UnityEngine;


public class BoardGame : MonoBehaviour
{
    public Piece(,) pieces = new Piece(8, 8);
    public GameObject whitePiecePrefab;
    public GameObject blackPiecePrefab;

    private Vector3 boardOffset = new Vector3(-4.0f, 0, -4.0f);
    private Vector3 pieceOffset = new Vector3(0.5f, 0.5f, 0.5f);

    private bool isBlack;
    private bool isBlackTurn;

    private Piece selectedPiece;


    private Vector2 mouseOver;
    private Vector2 startDrag;
    private Vector2 endDrag;




    private void Start()
    {
        GenerateBoard();
        isBlackTurn = true;
    }

    private void Update()
    {
        UpdateMouseOver();

        {
            int x = (int)mouseOver.x;
            int y = (int)mouseOver.y;

            if (selectedPiece != null)
                UpdatePieceDrag(selectedPiece);

            if (Input.GetMouseButtonDown(0))
                SelectPiece(x, y);

            if (Input.GetMouseButtonUp(0))
                TryMove((int)startDrag.x, (int)startDrag.y, x, y);

        }
    }

    private void UpdateMouseOver()
    {
      if (!Camera.main)
        {
            Debug.Log("Unable to find main camera");
            return;
        }

        RaycastHit hit;
        if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition),out hit, 25.0f, LayerMask.GetMask("Board")))
        {
            mouseOver.x = (int)(hit.point.x - boardOffset.x);
            mouseOver.y = (int)(hit.point.z - boardOffset.z);

            Debug.Log(mouseOver);
        }
        else
        {
            mouseOver.x = -1;
            mouseOver.y = -1;
        }
    } 
    private void UpdatePieceDrag (Piece p)
    {
        if (!Camera.main)
        {
            Debug.Log("Unable to find main camera");
            return;
        }

        RaycastHit hit;
        if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit, 25.0f, LayerMask.GetMask("Board")))
        {
            p.transform.position = hit.point + Vector3.up;
            
        }
    }

    private void SelectPiece(int x, int y)
    {
        //Out of Bounds
        if (x < 0 || x >= pieces.Length || y < 0 || y >= pieces.Length)
            return;

        Piece p = pieces(x, y);
        if (p != null)
        {
            selectedPiece = p;
            startDrag = mouseOver;
            Debug.Log(selectedPiece.name);

        }


    }

    private void TryMove(int x1, int y1, int x2, int y2)
    {
        //Multiplayer Support
        startDrag = new Vector2(x1, y1);
        endDrag = new Vector2(x2, y2);
        selectedPiece = pieces(x1, y1);

        //Out of Bounds
        if (x2 < 0 || x2 >= pieces.Length || y2 < 0 || y2 >= pieces.Length)
        {
            if (selectedPiece != null)
                MovePiece(selectedPiece, x1, y1);

            startDrag = Vector2.zero;
            selectedPiece = null;
            return;
        }
        
        if (selectedPiece != null)
        {
            // If it has not moved
            if (endDrag == startDrag)
            {
                MovePiece(selectedPiece, x1, y1);
                startDrag = Vector2.zero;
                selectedPiece = null;
                return;
            }
        }
        // Check if it is a valid move
        if (selectedPiece.ValidMove(pieces, x1, y1, x2, y2))
        {
            // Did we kill anything
            // If this is a jump
            if(Mathf.Abs(x2-x2) == 2)
            {
                Piece p = pieces((x1 + x2) / 2, (y1 + y2) / 2);
                if(p != null)
                {
                    pieces((x1 + x2) / 2, (y1 + y2) / 2) = null;
                    Destroy(p);
                }

                pieces(x2, y2) = selectedPiece;
                pieces(x1, y1) = null;
                MovePiece(selectedPiece, x2, y2);

                EndTurn();

            }
        }

    }
    private void EndTurn()
    {
        selectedPiece = null;
        startDrag = Vector2.zero;

        isBlackTurn = !isBlackTurn;
        CheckVictory();

    }
    private void CheckVictory()
    {

    }

    private void GenerateBoard()
    {
        // Generate Black Team
        for (int y = 0; y < 3; y++)
        {
            bool oddRow = (y % 2 == 0);
            for (int x = 0; x < 8; x += 2)
            {
                // Generate our Piece
                GeneratePiece((oddRow) ? x : x + 1 , y);
                
            }

        }

        // Generate White Team
        for (int y = 7; y > 4; y--)
        {
            bool oddRow = (y % 2 == 0);
            for (int x = 0; x < 8; x += 2)
            {
                // Generate our Piece
                GeneratePiece((oddRow) ? x : x + 1, y);
            }
        }

    }

    private void GeneratePiece(int x, int y)
    {
        bool isPieceWhite = (y > 3) ? true : false;
        GameObject go = Instantiate((isPieceWhite)?whitePiecePrefab:blackPiecePrefab) as GameObject;
        go.transform.SetParent(transform);
        Piece p = go.GetComponent<Piece>();
        pieces(x, y) = p;
        MovePiece(p, x, y);
    }

    private void MovePiece(Piece p,int x, int y)
    {
        p.transform.position = (Vector3.right * x) + (Vector3.forward * y) + boardOffset + pieceOffset;
    }
    
}

Pieces

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Piece : MonoBehaviour
{
    public bool isBlack;
    public bool isKing;

    public bool ValidMove(Piece(,) board, int x1, int y1, int x2, int y2)
    {
        // if you are moving on top of another piece
        if (board(x2, y2) != null)
            return false;

        int deltaMove = Mathf.Abs(x1 - x2);
        int deltaMoveY = y2 - y1;

        if (isBlack || isKing)
        {
            if (deltaMove == 1)
            {
                if (deltaMoveY == 1)
                    return true;
            }
            else if(deltaMove == 2)
            {
                if (deltaMoveY == 2)
                {
                    Piece p = board((x1 + x2) / 2, (y1 + y2) / 2);
                    if (p != null && p.isBlack != isBlack)
                        return true;
                }
            }
        }

        if (!isBlack || isKing)
        {
            if (deltaMove == 1)
            {
                if (deltaMoveY == -1)
                    return true;
            }
            else if (deltaMove == 2)
            {
                if (deltaMoveY == -2)
                {
                    Piece p = board((x1 + x2) / 2, (y1 + y2) / 2);
                    if (p != null && p.isBlack != isBlack)
                        return true;
                }
            }
        }
        return false;
    }    
}