How to use transform.position?

I’m trying to create a turn based game, right now i’m just working on the players movement, heres what i’ve kind of come up with. `

using System.Collections;

public float speed;
public int playerCanMove = 1;
public int oldPosition = Transform.position;

void Start(){
	if(Transform.position != oldPosition)
		playerCanMove--;
}
void Update () {
	
	if(Input.GetKeyDown(KeyCode.W))
	{
		transform.Translate(0.0f, 0.0f, speed);
		Transform.position = oldPosition;
	}
	else if(Input.GetKeyDown(KeyCode.A))
	{
		transform.Translate(-speed, 0.0f, 0.0f);
		Transform.position = oldPosition;

	}
	else if(Input.GetKeyDown(KeyCode.D))
	{
		transform.Translate(speed, 0.0f, 0.0f);
		Transform.position = oldPosition;

	}
	else if(Input.GetKeyDown(KeyCode.S))
	{
		transform.Translate(0.0f, 0.0f, -speed);
		Transform.position = oldPosition;

	}
	
}
void OnGUI(){
	GUI.Button(new Rect(1200,600,100,100), "End Turn");{
		playerCanMove = 1;

	}
}

`

My question is, how can I properly use transform.position to implement this system? Should I even be approaching it in this way?

This will probably help.
http://unity3d.com/learn/tutorials/modules/beginner/scripting/translate-and-rotate

These videos are a pretty good place to start scripting in general. They are short, but really quality info.

For starters always remember if you’re moving something, always multiply it by Time.deltaTime so it’ll remain constant on every end-system you’re develop. Also you can use Input.GetAxis(“Horizontal”) and Input.GetAxis(“Vertical”) for basic movement with alot less code. (this.transform.input.x += Input.GetAxis(“Horizontal”) * Time.deltaTime) As for the rest, what kind of turn based game are you making? Right now there’s no real indication of what the constraints on movement are. For example, is it tile based movement? Whats the maximum a player can move in a turn? You need to consider all this when coming up with how you’re going to design your movement system.