/// <summary> /// Throw rock on top cell. /// </summary> /// <param name="p_hHero"> Hero. </param> public static void ThrowRockTop(Hero p_hHero) { if (p_hHero.CurrentForestCell.ColumnIndex - 1 > 0) { ForestCell p_fcTarget = MainWindow.Forest[p_hHero.CurrentForestCell.LineIndex - 1, p_hHero.CurrentForestCell.ColumnIndex]; p_fcTarget.RemoveAlienOnCell(); Hero.Memory[p_fcTarget.LineIndex, p_fcTarget.ColumnIndex].HasNoAlien = 1; Hero.Memory[p_fcTarget.LineIndex, p_fcTarget.ColumnIndex].MayContainAlien = -1; p_hHero.CellsOK.Add(p_fcTarget); p_hHero.Score -= 10; } }
/// <summary> /// Throw rock on the left cell. /// </summary> /// <param name="p_hHero"> Hero. </param> public static void ThrowRockLeft(Hero p_hHero) { if (p_hHero.CurrentForestCell.LineIndex - 1 > 0) { // Set target ForestCell p_fcTarget = MainWindow.Forest[p_hHero.CurrentForestCell.LineIndex, p_hHero.CurrentForestCell.ColumnIndex - 1]; // Kill alien and remove radiation. p_fcTarget.RemoveAlienOnCell(); // Update memory Hero.Memory[p_fcTarget.LineIndex, p_fcTarget.ColumnIndex].HasNoAlien = 1; Hero.Memory[p_fcTarget.LineIndex, p_fcTarget.ColumnIndex].MayContainAlien = -1; // Mark cell as OK p_hHero.CellsOK.Add(p_fcTarget); p_hHero.Score -= 10; } }