コード例 #1
0
 public void MoveSouth()
 {
     if (HasLocationToSouth)
     {
         CurrentLocation = CurrentWorld.AtLocation(CurrentLocation.XCoordinate, CurrentLocation.YCoordinate - 1);
     }
 }
コード例 #2
0
 public void MoveNorth()
 {
     if (HasLocationToNorth)
     {
         CurrentLocation = CurrentWorld.AtLocation(CurrentLocation.XCoordinate, CurrentLocation.YCoordinate + 1);
     }
 }
コード例 #3
0
 public void MoveEast()
 {
     if (HasLocationToEast)
     {
         CurrentLocation = CurrentWorld.AtLocation(CurrentLocation.XCoordinate + 1, CurrentLocation.YCoordinate);
     }
 }
コード例 #4
0
        public GameSession()
        {
            CurrentPlayer = new Player
            {
                Name             = "Gutka",
                CharacterClass   = "Fighter",
                HitPoints        = 10,
                Gold             = 1000000,
                ExperiencePoints = 0,
                Level            = 1
            };

            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.AtLocation(0, 0);

            CurrentPlayer.Inventory.Add(ItemFactory.CreateGameItem(1001));
            CurrentPlayer.Inventory.Add(ItemFactory.CreateGameItem(1001));
            CurrentPlayer.Inventory.Add(ItemFactory.CreateGameItem(1002));
        }