C language writing to go maze game