public void ShowInfo(object sender, Tile tile) { TileParamsContent.Text = tile.TileParams.ToString(); TileItemsContent.Text = tile.ToString(); textBox1.Text = tile.TileIndex.ToString(); comboBox1.Items.AddRange(tile.AvailableTileItems.ToArray()); comboBox1.SelectedItem = comboBox1.Items[0]; }
public Tile GetTile() { currentTile = null; waitToInput = false; while (!waitToInput) { } if (currentTile == null) { waitToInput = false; } return currentTile; }
protected virtual void OnTileIsChecked(Tile e) { TileIsChecked?.Invoke(this, e); }
private void GenerateGameBoard() { for (var i = 0; i < Rows; i++) { for (var j = 0; j < Collums; j++) { gameBoard[i, j] = new Tile(new Ground()) { TileIndex = new Tile.Index(i, j) }; } } }
public string ShortInfoTileItems(Tile tile) { return tile.TileItemsList.Aggregate(string.Empty, (current, item) => current + (item[0] + " ")); }
public void Reset(Tile tile) { label1.Text = ShortInfoTileParams(tile.TileParams); label2.Text = ShortInfoTileItems(tile); }
public TileControl(Tile tile) { InitializeComponent(); Tile = tile; }
public void AddTileItemToBuildingQuery(IOnlyProductionObject tileItem, Tile containingTile) { if (containingTile.ControlPlayer != this) return; PlayerBuildQuery.Add( new TileItemBuildRequest( tileItem, containingTile ) ); }
public void Move(Tile tileToMove) { PositionTile = tileToMove; }