internal void InitializePiles(Deck<CardPolicy> drawPile, Deck<CardPolicy> discardPile) { var middleX = Width / 2; var yLocation = Height / 2 - (Board.DEFAULTSIZE.Height / 2) + 20; var boardSize = Board.DEFAULTSIZE; drawPile.Location = new Point(middleX - boardSize.Width - Card.DEFAULTCARDSIZE.Width - 20, yLocation); discardPile.Location = new Point(middleX + boardSize.Width + 20, yLocation); var drawSize = Deck<Card>.DRAWPILESIZE; var offset = new Point(-(drawSize.Width - Card.DEFAULTCARDSIZE.Width) / 2, -(drawSize.Height - Card.DEFAULTCARDSIZE.Height) / 2 + 5); drawPile.SetBackground(Properties.Resources.draw_pile.CutToSize(drawSize), offset); discardPile.SetBackground(Properties.Resources.discard_pile.CutToSize(drawSize), offset); lock (Objects) { Objects.AddFirst(drawPile); Objects.AddFirst(discardPile); } }