コード例 #1
0
ファイル: Create.cs プロジェクト: Marcotte173/Upstairs
 private static void NamePlayer()
 {
     Console.Clear();
     Write.Line("Please enter your name\n");
     owners[0].name = Return.String();
     Write.Line("\n" + owners[0].name + ", is that correct?");
     if (Return.Confirm() == false)
     {
         NamePlayer();
     }
 }
コード例 #2
0
ファイル: Slaver.cs プロジェクト: Marcotte173/Upstairs
    private static void HireNext()
    {
        DisplayGladiator();
        Write.Line(0, 16, Color.SPEAK + "'Well? Does anyone catch your eye?'" + Color.RESET);
        Write.Line(0, 28, "[0] to return");
        Gladiator g      = new Gladiator(1);
        int       choice = Return.Int();

        if (choice > 0 && choice <= list.Count)
        {
            g = list[choice - 1];
        }
        else if (choice == 0)
        {
            Hub.Menu();
        }
        else
        {
            HireNext();
        }
        Console.Clear();
        Return.PlayerInfo();
        Write.Line(0, 2, Color.NAME + g.name + Color.RESET + "?");
        Write.Line(0, 4, Color.STRENGTH + "Strength " + Color.RESET + $"  {g.Strength}");
        Write.Line(0, 5, Color.OFFENCE + "Offence  " + Color.RESET + $"  {g.Offence}");
        Write.Line(0, 6, Color.DEFENCE + "Defence  " + Color.RESET + $"  {g.Defence}");
        Write.Line(0, 7, Color.ENDURANCE + "Endurance" + Color.RESET + $"  {g.Endurance}");
        Write.Line(0, 9, Color.GOLD + "Price      " + Color.RESET + g.Price);
        if (Return.Afford(g.Price))
        {
            if (Return.Confirm())
            {
                Console.Clear();
                Write.Line(0, 1, Color.SPEAK + "'Wonderful!'" + Color.NPC + "\n\nRizzo" + Color.RESET + " takes your money, and " + Color.NAME + $"{g.name}" + Color.RESET + " joins your team\n");
                Create.player.gold -= g.Price;
                list.Remove(g);
                rosterAdd(g);
                Write.KeyPress(0, 28);
                Hub.Menu();
            }
            else
            {
                HireNext();
            }
        }
        else
        {
            Write.Line(0, 25, "You can't afford it\n");
            Write.KeyPress();
            Hub.Menu();
        }
    }