Today as I was designing the object model for War (see: James Games), I decided to write a small console application to help with some testing. Early in the process, I had to deal with the typical task of getting user-input. Typical code for getting input looks something like this:

static void Main(string[] args)
{
    Console.WriteLine("How many players?");
    int numberOfPlayers = int.Parse(Console.ReadLine());
    Console.WriteLine(String.Format("Creating game for {0} players...", numberOfPlayers));

    // More code...
}

Continue reading »

© 2011 James Tharpe Suffusion theme by Sayontan Sinha