Difference between revisions of "How would you increase the maximum size of a players hand"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
You would increase the value for the integer MaxHandSize.
+
In the main method there is a variable defined which is called MaxHandSize. U can set this to any desired number and then the max size of the players hand will be set to that. For example 25.
 +
 
 
<syntaxhighlight lang="C#">
 
<syntaxhighlight lang="C#">
static void Main(string[] args)
+
static void Main(string[] args) {
        {
+
    // ... Some Stuff Here
            List<String> AllowedWords = new List<string>();
 
            Dictionary<Char, int> TileDictionary = new Dictionary<char, int>();
 
            int MaxHandSize = 20;
 
  </syntaxhighlight>
 
  
For example you could change it to 25:
+
    int MaxHandSize = 25;
  
<syntaxhighlight lang="C#">
+
    // ... Some Stuff Here
static void Main(string[] args)
+
}
        {
+
</syntaxhighlight>
            List<String> AllowedWords = new List<string>();
 
            Dictionary<Char, int> TileDictionary = new Dictionary<char, int>();
 
            int MaxHandSize = 25;
 
  </syntaxhighlight>
 

Latest revision as of 18:40, 14 November 2017

In the main method there is a variable defined which is called MaxHandSize. U can set this to any desired number and then the max size of the players hand will be set to that. For example 25.

static void Main(string[] args) {
    // ... Some Stuff Here

    int MaxHandSize = 25;

    // ... Some Stuff Here
}