Has anyone developed a formula to show if two cells are adjacent?

Any single cell is surrounded by eight other cells.

What I need is two cells,\ that I can enter other cells locations into, and get a True False answer if they connect either vertically, horizontally or diagonally.

For example, the first cell someone puts in F:24, and the second puts in G:25. These cells touch, but if the second had put in G:27, they don't!! (I can use Row and Column functions for range, at least I figured that part out!!)

I am trying to help a new Excel person build a game and the question came up, and for the life of me I can't answer it.

In the game, anyone in contact range must sword fight, and if beyond contact must shoot it out.

Problem is, I can't get a formula to show if the cells "touch each other"

Any suggestions would be GREAT!!!!!!!!!