-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuper-sena.php
92 lines (72 loc) · 3.26 KB
/
super-sena.php
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
<?php
print_r(PHP_EOL);
print_r(' ... '.PHP_EOL);
print_r(' `+hmmdy/ :yNMMMNs` '.PHP_EOL);
print_r(' +NMMMMMMMd` `dMMMMMMMMN/ '.PHP_EOL);
print_r(' .hMMMMMMMMMMs hMMMMMMMMMMMd+. '.PHP_EOL);
print_r(' /hMMMMMMMMMMMMd`MMMMMMMMMMMMMMMd. '.PHP_EOL);
print_r(' .mMMMMMMMMMMMMMMN`MMMMMMMMMMMMMMMMy '.PHP_EOL);
print_r(' yMMMMMMMMMMMMMMMM-MMMMMMMMMMMMMMMMs '.PHP_EOL);
print_r(' /MMMMMMMMMMMMMMMM/MMMMMMMMMMMMMMMh` '.PHP_EOL);
print_r(' .odMMMMMMMMMMMMMhMMMMMMMMMMMMms- '.PHP_EOL);
print_r(' `-:+++/++syNMMMNddhysooso:.` '.PHP_EOL);
print_r(' :ymMMMMMMMMMMMMMMMMMMMMMMMMMMMmo` '.PHP_EOL);
print_r(' `dMMMMMMMMMMMMMMMdmMMMMMMMMMMMMMMMN. '.PHP_EOL);
print_r(' oMMMMMMMMMMMMMMM+oyyMMMMMMMMMMMMMMMy '.PHP_EOL);
print_r(' oMMMMMMMMMMMMMMm sy:MMMMMMMMMMMMMMM: '.PHP_EOL);
print_r(' oNMMMMMMMMMMMMy yy mMMMMMMMMMMMMy- '.PHP_EOL);
print_r(' `sMMMMMMMMMMM/ yd -NMMMMMMMMMm- '.PHP_EOL);
print_r(' +MMMMMMMMMh ym -mMMMMMMMm. '.PHP_EOL);
print_r(' .yNMMMMh/ oM` /dNMMmo '.PHP_EOL);
print_r(' `-. -Mo ` '.PHP_EOL);
print_r(' dM: '.PHP_EOL);
print_r(' -NN+ '.PHP_EOL);
print_r(' .sNm. '.PHP_EOL);
print_r(PHP_EOL);
print_r(' ** BEM VINDO AO SUPER SENA ** '.PHP_EOL);
$loop = true;
while ($loop) {
print_r(PHP_EOL);
print_r('|------------------------------------------------|'.PHP_EOL);
print_r('| Selecione uma opção abaixo: |'.PHP_EOL);
print_r('|------------------------------------------------|'.PHP_EOL);
print_r(PHP_EOL);
print_r('1) Registrar um jogo '.PHP_EOL);
print_r('2) Sortear numeros '.PHP_EOL);
print_r('3) Ver jogos registrados '.PHP_EOL);
print_r('4) Limpar jogos '.PHP_EOL);
print_r('5) Sair '.PHP_EOL);
print_r(PHP_EOL);
$option = null;
while (null == $option) {
print_r('Digite a opcao escolhida: ');
$option = stream_get_line(STDIN, 1024, PHP_EOL);
$checkOptionIsInt = filter_var($option, FILTER_VALIDATE_INT);
if (false == $checkOptionIsInt || $option < 0 || $option > 5) {
print_r('Opção invalida!'.PHP_EOL);
$option = null;
}
}
switch ($option) {
case 1:
include 'options/register-bet.php';
break;
case 2:
include 'options/rand-numbers.php';
break;
case 3:
include 'options/see-bets.php';
break;
case 4:
file_put_contents(__DIR__.'/database/bets.csv', '');
print_r('Jogos limpados com sucesso!'.PHP_EOL);
break;
default:
$loop = false;
break;
}
}
print_r(PHP_EOL);
print_r('|---------------------------------------------------|'.PHP_EOL);
print_r('| Ate logo! :-) Obrigado por usar o Super Sena! |'.PHP_EOL);
print_r('|---------------------------------------------------|'.PHP_EOL);