public override Game CreateGame(Player player, Topic topic)
 {
     return new PictureMultipleChoiceGame(Name, player,
         pairs: topic.PictureWordPairs.RandomSubset(_numberOfQuestions),
         decoys: topic.PictureWordPairs.Except(topic.PictureWordPairs.RandomSubset(_numberOfQuestions)).ToList(),
         numberOfCandidates: _numberOfCandidates);
 }
Example #2
0
 protected CardPairGame(string name, Player player, ICollection<PictureWordPair> pairs)
     : base(name, player)
 {
     PictureCards = pairs.Randomize().Select(x => new PictureCard(x, this) {State = DefaultCardState}).ToList();
     WordCards = pairs.Randomize().Select(x => new WordCard(x, this) {State = DefaultCardState}).ToList();
     UnsolvedPairs = pairs.ToList();
 }
        public SentenceBuilderGame(string name, Player player, ICollection<SentencePrompt> prompts, ICollection<string> decoys, int numberOfCandidates = 3)
            : base(name, player)
        {
            _unsolvedPrompts = new Stack<SentencePrompt>(prompts);
            _decoys = decoys;
            _numberOfCandidates = numberOfCandidates;

            ActivateNext();
        }
Example #4
0
        protected MultipleChoiceGame(string name, Player player, ICollection<PictureWordPair> pairs, ICollection<PictureWordPair> decoys, int numberOfCandidates = 3)
            : base(name, player)
        {
            UnsolvedPairs = new Stack<PictureWordPair>(pairs);
            Decoys = decoys;
            _numberOfCandidates = numberOfCandidates;

            ActivateNext();
        }
 public override Game CreateGame(Player player, Topic topic)
 {
     return new PairMatchingGame(Name, player,
         pairs: topic.PictureWordPairs.RandomSubset(_numberOfPairs));
 }
Example #6
0
 public PairMatchingGame(string name, Player player, ICollection<PictureWordPair> pairs)
     : base(name, player, pairs)
 {
 }
Example #7
0
 protected Game(string name, Player player)
 {
     Name = name;
     Player = player;
 }
Example #8
0
 public MemoryGame(string name, Player player, ICollection<PictureWordPair> pairs)
     : base(name, player, pairs)
 {
 }
 public override Game CreateGame(Player player, Topic topic)
 {
     return new SentenceBuilderGame(Name, player,
         prompts: topic.SentencePrompts.RandomSubset(_numberOfSentences),
         decoys: topic.SentencePromptDecoys);
 }