private void ShowHand() { for (int i = 0; i < HandCardPictureBoxes.Count(); i++) { HandCardPictureBoxes[i].Show(); HandCardPictureBoxes[i].Image = CardSpriteGenerator.GetApropriateSprite(Game.Player.OwnedCards[i]); } }
private void PathCardSelected() { PictureBoxPathPos1.Show(); PictureBoxPathPos2.Show(); ButtonDiscardCard.Show(); Game.Player.SelectedCard.IsPathUpside = false; PictureBoxPathPos1.Image = new Bitmap(CardSpriteGenerator.GetApropriateSprite(Game.Player.SelectedCard), new Size(85, 111)); CardSet flipedCard = new CardSet(); flipedCard.Path = Game.Player.SelectedCard.Path; flipedCard.PathOpenings = Game.Player.SelectedCard.PathOpenings; flipedCard.Type = CardType.Path; flipedCard.IsPathUpside = true; PictureBoxPathPos2.Image = new Bitmap(CardSpriteGenerator.GetApropriateSprite(flipedCard), new Size(85, 111)); }
private void TileSelectPathCard(object sender) { BlockType?playerBlocks = Game.Players.Where(player => player.Name == Game.Player.Name).First().Blocks; if (playerBlocks == null || playerBlocks == 0) { List <int[]> availableSpots = Game.AvailableFieldTiles(Game.Player.SelectedCard); for (int i = 0; i < availableSpots.Count; i++) { if (fieldTiles[availableSpots[i][0] - 1, availableSpots[i][1] - 1] == sender) { fieldTiles[availableSpots[i][0] - 1, availableSpots[i][1] - 1].Image = new Bitmap(CardSpriteGenerator.GetApropriateSprite(Game.Player.SelectedCard), new Size(85, 111)); Game.Player.SelectedCard.FieldCol = availableSpots[i][0]; Game.Player.SelectedCard.FieldRow = availableSpots[i][1]; Game.Player.SelectedCard.Owner = "Field"; Game.CheckGoalCardReached(Game.Player.SelectedCard); EndTurn(); break; } } ShowField(); } }