public UpdatePosition ( |
||
newPosition | ||
리턴 | void |
public void MergeTile(Tile movingTile, Tile mergedTile) { int mergedValue = GetNextValue(movingTile.Value); Tile newMergedTile = new Tile(mergedTile.Position.X, mergedTile.Position.Y, mergedValue); newMergedTile.MergeFrom = movingTile; Board.RemoveTile(movingTile); Board.RemoveTile(mergedTile); movingTile.UpdatePosition(mergedTile.Position); Board.InsertTile(newMergedTile); Score += mergedValue; }
public void MergeTile(Tile movingTile, Tile mergedTile) { int mergedValue = GetNextValue(movingTile.Value); Tile newMergedTile = new Tile(mergedTile.Position.X, mergedTile.Position.Y, mergedValue); newMergedTile.MergeFrom = movingTile; Board.RemoveTile(movingTile); Board.RemoveTile(mergedTile); movingTile.UpdatePosition(mergedTile.Position); Board.InsertTile(newMergedTile); Score += mergedValue; }
public void Move(Tile tile, Point newPosition) { Board.RemoveTile(tile); tile.UpdatePosition(newPosition); Board.InsertTile(tile); }
public void Move(Tile tile, Point newPosition) { Board.RemoveTile(tile); tile.UpdatePosition(newPosition); Board.InsertTile(tile); }