Пример #1
0
 /// <summary>
 /// Definition Board size
 /// </summary>
 /// <param name="x">Count cards on coordinate x</param>
 /// <param name="y">Count cards on coordinate y</param>
 /// <param name="PackCard">Definition Card in Package, which will by put on the board.</param>
 public DefinitionBoardSize(int x, int y, PackCards PackCard)
 {
     AppSB.Log("Inicialization board [" + x.ToString() + "," + y.ToString() + "] with PackCards count [" + PackCard.Items.Count + "]");
     this.maximumSolutionCardsOnBoard    = new List <BoardDeskAndPackCard>();
     this.maxNumberOfInsertedCardOnBoard = -1;
     Board           = new BoardDeskAndPackCard(x, y);
     this.boardSizeX = x;
     this.boardSizeY = y;
     Board.PackCard  = PackCard;
 }
Пример #2
0
        private PackCards InitCards()
        {
            // Card X x Y
            PackCards pc = new PackCards();

            pc.AddCardToPack(new CardDefinition() // Card 1x1
            {
                Top = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Red
                },
                Right = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Yellow
                },
                Bottom = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Red
                },
                Left = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Green
                },
                Position = 1
            });

            pc.AddCardToPack(new CardDefinition() // Card 2x1
            {
                Top = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Blue
                },
                Right = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Yellow
                },
                Bottom = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Blue
                },
                Left = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Green
                },
                Position = 2
            });

            pc.AddCardToPack(new CardDefinition() // Card 3x1
            {
                Top = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Red
                },
                Right = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Yellow
                },
                Bottom = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Blue
                },
                Left = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Yellow
                },
                Position = 3
            });

            pc.AddCardToPack(new CardDefinition() // Card 1x2
            {
                Top = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Red
                },
                Right = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Blue
                },
                //Right = new ImageOnCard() { Smile = TypeSmile.Mount, Color = TypeColorSmile.Blue }, // is correct to finish picture

                Bottom = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Green
                },
                Left = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Red
                },
                Position = 4
            });

            pc.AddCardToPack(new CardDefinition() // Card 2x2
            {
                Top = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Blue
                },
                Right = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Green
                },
                Bottom = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Red
                },
                Left = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Yellow
                },
                Position = 5
            });

            pc.AddCardToPack(new CardDefinition() // Card 2x3
            {
                Top = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Blue
                },
                Right = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Yellow
                },
                Bottom = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Red
                },
                Left = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Green
                },
                Position = 6
            });

            pc.AddCardToPack(new CardDefinition() // Card 3x1
            {
                Top = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Blue
                },
                Right = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Green
                },
                Bottom = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Yellow
                },
                Left = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Blue
                },
                Position = 7
            });

            pc.AddCardToPack(new CardDefinition() // Card 3x2
            {
                Top = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Blue
                },
                Right = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Red
                },
                Bottom = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Blue
                },
                Left = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Yellow
                },
                Position = 8
            });

            pc.AddCardToPack(new CardDefinition() // Card 3x3
            {
                Top = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Yellow
                },
                Right = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Red
                },
                Bottom = new ImageOnCard()
                {
                    Smile = TypeSmile.Mount, Color = TypeColorSmile.Green
                },
                Left = new ImageOnCard()
                {
                    Smile = TypeSmile.Eye, Color = TypeColorSmile.Green
                },
                Position = 9
            });

            return(pc);
        }