I have made little game in which player can move trough a dungeon. But now I want to make the game play itself. But I cant make my bot to press buttons.
ConsoleKeyInfo cki;
cki = Console.ReadKey();
cki = Game.Bot.Move();
public static ConsoleKeyInfo Move(Random rnd)
{
ConsoleKeyInfo cki;
cki.Key = ConsoleKey.RightArrow;
return cki;
}
But this give me an error.
I just want to move my character somehow. P.S. I founded this but cant test it because I don't know the char for arrows keys
ConsoleKeyInfo cki=new ConsoleKeyInfo('', ConsoleKey.LeftArrow, false, false, false);
I fount what I was looking for.
This line gives me the button pressed :)