コード例 #1
0
ファイル: Main.cs プロジェクト: Sanu-samm/callbreak
        public void initializePlayerBoardsPosition()
        {
            //add dummy positions
            playerPositions.Clear();
            for (int j = 0; j < 4; j++)
            {
                playerPositions.Add(new playerPosition());
            }

            int StartPosition = boardBelongsTo;


            for (int i = 0; i < 4; i++)
            {
                playerPosition Position = new playerPosition();

                if (StartPosition > 3)
                {
                    StartPosition = 0;
                }
                if (i == 0)
                {
                    Position.seat = "S";
                    Position.x    = 175;
                    Position.y    = 350;
                }
                if (i == 1)
                {
                    Position.seat = "W";
                    Position.x    = 20;
                    Position.y    = 100;
                }
                if (i == 2)
                {
                    Position.seat = "N";
                    Position.x    = 175;
                    Position.y    = 30;
                }
                if (i == 3)
                {
                    Position.seat = "E";
                    Position.x    = 480;
                    Position.y    = 100;
                }

                playerPositions[StartPosition] = Position;
                StartPosition++;
            }
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: nishesj/callbreak
        public void initializePlayerBoardsPosition()
        {
            //add dummy positions
            playerPositions.Clear();
            for (int j = 0; j < 4; j++)
            {
                playerPositions.Add(new playerPosition());
            }

            int StartPosition = boardBelongsTo;

            for (int i = 0; i < 4; i++)
            {
                playerPosition Position = new playerPosition();

                if (StartPosition > 3) StartPosition = 0;
                if (i == 0)
                {
                    Position.seat = "S";
                    Position.x = 175;
                    Position.y = 350;

                }
                if (i == 1)
                {
                    Position.seat = "W";
                    Position.x = 20;
                    Position.y = 100;
                }
                if (i == 2)
                {
                    Position.seat = "N";
                    Position.x = 175;
                    Position.y = 30;
                }
                if (i == 3)
                {
                    Position.seat = "E";
                    Position.x = 480;
                    Position.y = 100;
                }

                playerPositions[StartPosition] = Position;
                StartPosition++;
            }
        }