Phandelver Tabletop Campaign Character Sheets

- Posted in gaming by

Phandelver Tabletop Campaign Character Sheets

Character Lev 9 HP Lev 10 HP Lev 11 HP Lev 13 HP
Celaena 63 69 75 87
Feyre 34 39 44 50
Lanky 41 44 47 53
Whiteheart 52 57 62 85
Character Lev 5 HP Lev 6 HP Lev 7 HP Lev 8 HP
Celaena 34 39 44 57
Feyre 20 23 26 29
Lanky 21 24 27 38
Whiteheart 27 31 35 47

Bytes to characters and vice versa

- Posted in Coding by

It just so happens that any character we might use in a string has a numerical encoding. The alphabet ranges from 65-90 for capital letters A through Z, and from 97-122 for lowercase letters a-z. When we want to work with text encoding, we need to add the following namespace to the top of our source code file:

using System.Text;

The numerical representation of our English alphabet takes the form of unique numbers for each upper and lowercase letter, and these are stored in a variable type called byte. A byte is an 8-bit integer that can hold values from 0 to 255.

If we have a string variable named sChar, we can obtain its numerical encoding as follows, if we have referenced the System.Text namespace:

byte[] bt = Encoding.Default.GetBytes(sChar);

The reverse is encoding bytes to characters. If we have an array of bytes, we can convert each element’s value to its corresponding character:

byte[] bytes = {40, 80, 20};
char result;
foreach(byte number in bytes)
{
  result = Convert.ToChar(number);
  Console.WriteLine(“{0} converts to {1}.”, number, result);
}

Full source code listing:

download sourcecode