My code( Sorry for the previous inconvenience):
x = 0;
y = 0;
lstx = {};
lsty = {};
For[i = 0, i < 1000, i++,
a = RandomReal[];
b = RandomReal[];
c = RandomReal[];
If[ c < 0.5,
(If[a > 0.5, x = x + 1, x = x - 1];
AppendTo[lstx, x]),
(If[b > 0.5, y = y + 1, y = y - 1];
AppendTo[lsty, y])
]]