Esempio n. 1
0
 void UpdateNextNextPuyoPuyo()
 {
     this.nextNext = new PuyoPuyo()
     {
         Center = this.generator.GenerateRandomPuyo(new Vector2Int(10, 7)),
         Sub    = this.generator.GenerateRandomPuyo(new Vector2Int(10, 8))
     };
 }
Esempio n. 2
0
        /// <summary>
        /// This method will keep looping until a bug is found, or if the player closes the program.
        /// </summary>
        private static void Update()
        {
            #region Game-Diff-Selection
            // Write instructions + information to Console.
            TextManager.WriteLine("Select a game: ");
            foreach (var index in IndexToGameMode)
            {
                TextManager.WriteLine($"{index.Key}. {index.Value}");
            }
            TextManager.WriteLine();
            TextManager.WriteLine("Enter a number to select game: \n", ConsoleColor.Green);

            // Get gamemode from user input
            var gameIndex = GetIndexFromUserInput(IndexToGameMode.Count);
            var gameName  = IndexToGameMode[gameIndex];

            // Write instrutions + information to Console.
            TextManager.Clear();
            TextManager.WriteLine($"Game Selected: {gameName}");
            foreach (var index in IndexToDifficulty)
            {
                TextManager.WriteLine($"{index.Key}. {index.Value}");
            }
            TextManager.WriteLine();
            TextManager.WriteLine("Enter a number to select difficulty: \n", ConsoleColor.Green);

            // Get game difficulty from user input
            var difficultyIndex = GetIndexFromUserInput(IndexToDifficulty.Count);
            var difficulty      = IndexToDifficulty[difficultyIndex];

            // Write instructions + information to Console.
            TextManager.Clear();
            TextManager.WriteLine($"Game Selected: {gameName}");
            TextManager.WriteLine($"Difficulty Selected: {difficulty}");
            TextManager.WriteLineBreak();
            TextManager.WriteLine();
            #endregion

            // Start game depending on what the user had input.
            switch (gameIndex)
            {
            case 1:
                CurrentGame = new MineSweeper(difficulty);
                break;

            case 2:
                CurrentGame = new PuyoPuyo(difficulty);
                break;

            default:
                throw new Exception("Invalid game mode has been declared.");
            }

            // Start the game once the user has selected a game and difficulty.
            CurrentGame.StartGame();
        }
Esempio n. 3
0
// END CUT HERE
// BEGIN CUT HERE
    public static void Main()
    {
        PuyoPuyo ___test = new PuyoPuyo();

        ___test.run_test(-1);
        try {
        } catch (Exception e) {
//Console.WriteLine(e.StackTrace);
            Console.WriteLine(e.ToString());
        }
    }
Esempio n. 4
0
    long[,,] dp = new long[MAX, MAX, 2]; //���������A�����Ȃ��Ƃ����Ȃ��̂̐�

    #endregion Fields

    #region Methods

    // END CUT HERE
    // BEGIN CUT HERE
    public static void Main()
    {
        PuyoPuyo ___test = new PuyoPuyo();
        ___test.run_test(-1);
        try {

        } catch(Exception e) {
        //Console.WriteLine(e.StackTrace);
        Console.WriteLine(e.ToString());
        }
    }
Esempio n. 5
0
    void UpdateNextPuyoPuyo()
    {
        if (this.nextNext == null)
        {
            UpdateNextNextPuyoPuyo();
        }
        this.next = this.nextNext;

        this.next.Center.MoveTo(new Vector2Int(9, 10));
        this.next.Sub.MoveTo(new Vector2Int(9, 11));

        UpdateNextNextPuyoPuyo();
    }
Esempio n. 6
0
    /// <summary>
    /// プレイヤーのぷよを生成する。
    /// </summary>
    void CreateNewPlayerPuyo()
    {
        this.playerPosition = this.initialPosition;

        if (this.next == null)
        {
            UpdateNextPuyoPuyo();
        }

        this.current = this.next;
        UpdateNextPuyoPuyo();

        var subPos = this.playerPosition + Direction.Up.ToVector2Int();

        this.subPosition = subPos;

        this.current.Center.MoveTo(this.playerPosition);
        this.current.Sub.MoveTo(subPos);

        playerDir = Direction.Up;
    }