-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
menu program and makefile adjustments
- Loading branch information
1 parent
86cde73
commit 65311d6
Showing
8 changed files
with
66 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
t= | ||
play-ruby: | ||
@echo "Qual aposta quer fazer. Ex: t='megasena' ou t='quina'" | ||
ruby ruby/lib/run_$(t).rb | ||
ruby ruby/lib/run.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
play-megasena: | ||
ruby lib/run_megasena.rb | ||
|
||
play-quina: | ||
ruby lib/run_quina.rb | ||
play: | ||
ruby lib/run.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
def menu | ||
puts "Quer jogar o que Rogerinho? \n | ||
[1] Mega-sena [2] Quina [3] Lotomania [0] Exit \n\n" | ||
print 'Digite aqui a sua escolha: ' | ||
end | ||
|
||
menu | ||
|
||
game_chosen = gets.chomp | ||
|
||
while game_chosen != '0' | ||
system('clear') | ||
|
||
case game_chosen | ||
when '1' | ||
puts "\nMEGA-SENA" | ||
load 'ruby/lib/run_megasena.rb' | ||
|
||
when '2' | ||
puts "\nQUINA" | ||
load 'ruby/lib/run_quina.rb' | ||
|
||
when '3' | ||
puts "\nLOTOFACIL" | ||
load 'ruby/lib/run_lotofacil.rb' | ||
|
||
else | ||
"\nNenhuma escolha possível para: #{game_chosen}" | ||
end | ||
|
||
menu | ||
game_chosen = gets.chomp | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters