Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Player
- {
- // Constructor - guarantees that navi and chipset will never be null (unless later changed)
- public Player(Navi navi, ChipSet chipSet)
- {
- if (navi == null) throw new ArgumentNullException();
- if (chipSet == null) throw new ArgumentNullException();
- Navi = navi;
- ChipSet = chipSet;
- }
- public int Wins { get; set; }
- public Navi Navi { get; set; } // A local variable of the type "Navi" which is also named "Navi"
- public ChipSet ChipSet { get; set; }
- }
- public class Navi
- {
- public const int HARD_LIFE_CAP = 2000; // Better as a static object of type "GameSettings" or something similar
- public Point Position { get; set; }
- public int Life { get; set; }
- public int LifeMax { get; set; }
- public Texture2D Sprite { get; set; } // Ideally there should be a separate class that contains per-sprite frame data
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement