Example #1
0
 public MoveImpl(CellPlace target_cell, OrientedCell.CellOrientation orient, CellPlace unit_place, int steps)
     : base(unit_place)
 {
     this.target_cell = target_cell;
     this.steps       = steps;
     this.orient      = orient;
 }
Example #2
0
    //ToDo it could take a time. change cells_list to Dictionary<GameboardCell, CellData>
    public CellData FindCell(CellPlace cell_place)
    {
        CellData ret = null;

        if (cell_place != null)
        {
            GameboardCell search_cell = gameboard_impl.cells[cell_place.board_x, cell_place.board_y];
            if (search_cell != null)
            {
                if (search_cell.notificator != null && search_cell.notificator as CellData != null)
                {
                    ret = search_cell.notificator as CellData;
                }
                else
                {
                    ret = cells_list.Find(cell_data => cell_data.cell == search_cell);
                }
            }
        }

        return(ret);
    }
Example #3
0
 public SkipMoveImpl(CellPlace unit_place)
 {
     this.unit_place = unit_place;
 }
Example #4
0
 public MagicMoveImpl(CellPlace target_cell, int card_idx, bool isHealing) :
     base(target_cell, OrientedCell.CellOrientation.Default, null, target_cell, 0, isHealing)
 {
     this.card_idx = card_idx;
 }
Example #5
0
 public CardMoveImpl(CellPlace target_cell, OrientedCell.CellOrientation orient, int card_idx) :
     base(target_cell, orient, null, 0)
 {
     this.card_idx = card_idx;
 }
Example #6
0
 public KillMoveImpl(CellPlace target_cell, OrientedCell.CellOrientation orient, CellPlace unit_place, CellPlace unit_to_kill_place, int steps, bool isHealing) :
     base(target_cell, orient, unit_place, steps)
 {
     this.isHealing          = isHealing;
     this.unit_to_kill_place = unit_to_kill_place;
 }