DisplayTileValues

From TRCCompSci - AQA Computer Science
Revision as of 14:16, 21 September 2017 by M0hk4l3 (talk | contribs) (Created page with "This is quite the simple method, but I'll explain it nonetheless. The method loops through each KeyValuePair in the TileDictionary; A Dictionary which if u recall stores the c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is quite the simple method, but I'll explain it nonetheless. The method loops through each KeyValuePair in the TileDictionary; A Dictionary which if u recall stores the character point associations of the program. Note when iterating through a dictionary u don't iterate through the value or the keys but u instead recieve an association between the two in a datatype struct KeyValuePair<TKey, TValue>. To access the key from this struct u simple use object notation and the identifier Key and for the value u use the same and identifier Value. Once the iteration has begon, the program outputs the character (the key) and it's corresponding point score (the value).