Example #1
0
 public void FindEntry(Board board)
 {
     EntryCell = (TeleportationCell)board.CellsList.FirstOrDefault(p => p is TeleportationCell && ((TeleportationCell)p).PortalId == PortalId);
     if (EntryCell != null)
     {
         EntryCell.ExitCell = this;
     }
 }
Example #2
0
 public void SetOtherPortal(Board board)
 {
     if (_isEntry)
     {
         ExitCell = FindOtherPortal(board);
         if (ExitCell != null)
         {
             ExitCell.EntryCell = this;
         }
     }
     else
     {
         EntryCell = FindOtherPortal(board);
         if (EntryCell != null)
         {
             EntryCell.ExitCell = this;
         }
     }
 }