mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
struct capitalization: fix the rest of tests
This commit is contained in:
parent
ed93185cb7
commit
d482b1f824
@ -238,6 +238,7 @@ fn (v mut V) compile() {
|
||||
println('all .v files:')
|
||||
println(v.files)
|
||||
}
|
||||
/*
|
||||
if v.pref.is_debug {
|
||||
println('\nparsers:')
|
||||
for q in v.parsers {
|
||||
@ -248,6 +249,7 @@ fn (v mut V) compile() {
|
||||
println(q)
|
||||
}
|
||||
}
|
||||
*/
|
||||
// First pass (declarations)
|
||||
for file in v.files {
|
||||
for i, p in v.parsers {
|
||||
|
@ -10,7 +10,7 @@ const (GDesc = ' The object of Roulette is to pick the number where the spinnin
|
||||
Otherwise, you will lose your bet.\n')
|
||||
const (Odd = 'Red' Even = 'Black')
|
||||
|
||||
struct options {
|
||||
struct Options {
|
||||
long_opt string
|
||||
short_opt string
|
||||
}
|
||||
@ -20,7 +20,7 @@ fn display_help() {
|
||||
}
|
||||
|
||||
fn option_parser() bool {
|
||||
help := options{'--help', '-h'}
|
||||
help := Options{'--help', '-h'}
|
||||
for i := 0; i < os.args.len; i++ {
|
||||
if os.args[i]== help.long_opt || os.args[i]== help.short_opt {
|
||||
display_help()
|
||||
@ -115,7 +115,7 @@ fn is_broke(money int) bool {
|
||||
println('You\'broke, the game is over..')
|
||||
return false
|
||||
} else {
|
||||
quit := options{'yes', 'y'}
|
||||
quit := Options{'yes', 'y'}
|
||||
println('You\'ve $money V. Do you want to quit the casino with your winnings? (y/n)')
|
||||
line := os.get_line().trim_space().to_lower()
|
||||
if line== quit.long_opt || line== quit.short_opt {
|
||||
|
Loading…
Reference in New Issue
Block a user