-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
96 lines (85 loc) · 3.33 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSCampeonato
{
class Program
{
static void Main(string[] args)
{
Competicao C = new Competicao();
C.jog = new Jogador();
Jogador J = new Jogador();
string op = null;
Console.WriteLine("\n Programa: Campeonato individual");
do
{
Console.WriteLine("\n Digite uma op��o: \n");
C.menu();
op = Console.ReadLine();
switch (op.ToUpper())
{
case "1":
Console.Clear();
J.cadastrarDados();
Random numAleatorio = new Random();
J.codIncricao = numAleatorio.Next(1, 20);
Console.ReadKey();
break;
case "2":
Console.Clear();
J.mostrarDados();
Console.ReadKey();
break;
case "3":
Console.Clear();
J.consultarCodigo();
Console.ReadKey();
break;
case "4":
J.alterarDados();
Console.ReadKey();
break;
case "5":
J.deletarDados();
Console.ReadKey();
break;
case "6":
Console.Clear();
if (J.i >= 1)
{
J.listarCompetidores();
Console.WriteLine("\n Escolha dois jogadores para disputar");
J.selecionarJogador();
J.calcularPontos();
Console.ReadKey();
J.mostraVencedor();
}
else
{
Console.WriteLine("\n As vagas est�o vazias, cadastre um jogador!");
}
Console.ReadKey();
break;
case "Q":
Console.Clear();
Console.Write("\n\n\n\n\n - - - - - - - - - - - - - - - - ");
Console.Write("\n\t | |");
Console.Write("\n\n\t | |");
Console.Write("\n\n\t | Saindo do programa... |");
Console.Write("\n\n\t | |");
Console.Write("\n\n\t | |");
Console.WriteLine("\n - - - - - - - - - - - - - - - - \n");
break;
default:
Console.WriteLine("\nErro! op��o incorreta.");
Console.ReadKey();
break;
}
} while(op.ToUpper() != "Q");
Console.ReadKey();
}
}
}