예제 #1
0
            public Tile(int id, WarfranePuzzle puzzle)
            {
                X  = (int)(Math.Sin(id * Math.PI / 3) * 100 + 200);
                Y  = (int)(Math.Cos(id * Math.PI / 3) * 100 + 200);
                ID = id;

                switch (id)
                {
                case 0:
                    Adj = new int[] { 1, 2, 3, 4, 5, 6 };
                    break;

                case 1:
                    Adj = new int[] { 0, 2, 6 };
                    break;

                case 2:
                    Adj = new int[] { 0, 3, 1 };
                    break;

                case 3:
                    Adj = new int[] { 0, 4, 2 };
                    break;

                case 4:
                    Adj = new int[] { 0, 5, 3 };
                    break;

                case 5:
                    Adj = new int[] { 0, 6, 4 };
                    break;

                case 6:
                    Adj = new int[] { 0, 1, 5 };
                    break;
                }

                Puzzle = puzzle;
            }
예제 #2
0
            public Tile(int id, WarfranePuzzle puzzle)
            {
                this.X = (int) (Math.Sin(id * Math.PI / 3) * 100 + 200);
                this.Y = (int) (Math.Cos(id * Math.PI / 3) * 100 + 200);
                this.ID = id;

                switch (id)
                {
                    case 0:
                        this.Adj = new[] { 1, 2, 3, 4, 5, 6 };
                        break;
                    case 1:
                        this.Adj = new[] { 0, 2, 6 };
                        break;
                    case 2:
                        this.Adj = new[] { 0, 3, 1 };
                        break;
                    case 3:
                        this.Adj = new[] { 0, 4, 2 };
                        break;
                    case 4:
                        this.Adj = new[] { 0, 5, 3 };
                        break;
                    case 5:
                        this.Adj = new[] { 0, 6, 4 };
                        break;
                    case 6:
                        this.Adj = new[] { 0, 1, 5 };
                        break;
                }

                this.Puzzle = puzzle;
            }
예제 #3
0
 public Tile(WarfranePuzzle puzzle) : this(0, puzzle)
 {
     X = 200;
     Y = 200;
 }
예제 #4
0
 public Tile(WarfranePuzzle puzzle)
     : this(0, puzzle)
 {
     this.X = 200;
     this.Y = 200;
 }