Version with only horizontal/vertical moves