Since I can see you are trying, here is a simple working example:
Step 1: Create a NEW, EMPTY project with a NEW, EMPTY SCENE
Step 2: In your project, create a (C#) script called “TileSwap”… (SEE SCRIPT BELOW)
Step 3: Attach the script to the main camera in your scene. (Don’t move the camera) Build and run.

Here is the script:
using UnityEngine;
using System.Collections;
public class TileSwap : MonoBehaviour {
int gameSize = 5;
public Vector2 slot = new Vector2();
// Use this for initialization
void Start () {
for(int x = 0;x < gameSize;x++){
for(int y = 0;y < gameSize;y++){
if(x+y < 8){
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
cube.transform.position = new Vector3(x-gameSize/2, y-gameSize/2, 0);
if((x+y)%2 == 0)
cube.renderer.material.color = Color.black;
}
else
slot = new Vector2(x-gameSize/2,y-gameSize/2);
}
}
transform.position = new Vector3(0,0,-10);
}
// Update is called once per frame
void Update () {
if(Input.touchCount > 0){
if(Input.touches[0].phase == TouchPhase.Began){
RaycastHit hit;
if(Physics.Raycast(camera.ScreenPointToRay(Input.touches[0].position),out hit)){
if(Vector3.Distance(hit.transform.position,slot) == 1){
var temp = hit.transform.position;
hit.transform.position = slot;
slot = temp;
}
}
}
}
}
}
this is pretty much keeping in the spirit of the original tutorial in your link… Enjoy!
p.s. please don’t forget to check my answer as accepted ;}
EDIT
pps and may I suggest also this one, unless you have further questions:
http://answers.unity3d.com/questions/365424/how-to-make-camera-to-center-the-dynamically-place.html
(in my above example, we keep (0,0,0) [the world origin] as the center of our grid, by using “gameSize/2” where necessary… )
which is why I simply set the position to (0,0,-10)…