Example #1
0
 public Cell_Interaction CheckingLeftCell(Cell_Interaction playerCell)
 {
     if (playerCell.cell_j - 1 >= 0)
     {
         return(cellReferences[playerCell.cell_i, playerCell.cell_j - 1]);
     }
     else
     {
         return(null);
     }
 }
Example #2
0
 public Cell_Interaction CheckingUpCell(Cell_Interaction playerCell)
 {
     if (playerCell.cell_i + 1 < cellReferences.GetLength(0))
     {
         return(cellReferences[playerCell.cell_i + 1, playerCell.cell_j]);
     }
     else
     {
         return(null);
     }
 }
Example #3
0
 public Cell_Interaction CheckingDownCell(Cell_Interaction playerCell)
 {
     if (playerCell.cell_i - 1 >= 0)
     {
         return(cellReferences[playerCell.cell_i - 1, playerCell.cell_j]);
     }
     else
     {
         return(null);
     }
 }
Example #4
0
 public Cell_Interaction CheckingRightCell(Cell_Interaction playerCell)
 {
     if (playerCell.cell_j + 1 < cellReferences.GetLength(1))
     {
         return(cellReferences[playerCell.cell_i, playerCell.cell_j + 1]);
     }
     else
     {
         return(null);
     }
 }
 //Metodo per assegnare il riferimento alla propria cella
 public void AssignCellReference(Cell_Interaction comingCellReference)
 {
     this.cellReference = comingCellReference;
 }