Example #1
0
        public static Game CreateGame(string gameid, string[] players, string[] variants)
        {
            Game obj;

            switch (gameid)
            {
            case "ithaka":
                obj = new Ithaka(players);
                break;

            default:
                throw new ArgumentOutOfRangeException("The game id you passed is not recognized.");
            }
            return(obj);
        }
Example #2
0
        public static Game LoadGame(string gameid, string state)
        {
            Game obj;

            switch (gameid)
            {
            case "ithaka":
                obj = new Ithaka(state);
                break;

            default:
                throw new ArgumentOutOfRangeException("The game id you passed is not recognized.");
            }
            return(obj);
        }