test $INPUT_RANDOM_WEIGHT_FILE
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
package input
|
||||
|
||||
import "os"
|
||||
|
||||
type Input interface {
|
||||
Read() []Button
|
||||
}
|
||||
|
||||
func New() Input {
|
||||
return NewRandom(randomCharFromRange('a', 'g'))
|
||||
foo := randomCharFromRange('a', 'g')
|
||||
if p, ok := os.LookupEnv("INPUT_RANDOM_WEIGHT_FILE"); ok {
|
||||
foo = randomCharFromWeightFile(p)
|
||||
}
|
||||
return NewRandom(foo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user