replace' (c:cs) n z p | z == n = (playerToCell p) : cs
                      | otherwise = c : replace' cs n (z+1) p
replace' (c:cs) n z p | z == n = (playerToCell p) : cs
                      | otherwise = c : replace' cs n (z+1) p
replace' (c:cs) n z p | z == n = (playerToCell p) : cs
                      | otherwise = c : replace' cs n (z+1) p