struct TwentyFortyEight::Options
- TwentyFortyEight::Options
- Struct
- Value
- Object
Overview
A simple command line argument wrapper
See the defined instance methods for possible options
exist yet. To learn how to set these from a command line, run 2048 -h
Defined in:
twenty_forty_eight/options.crConstructors
-
.new(size : Int32 = 4, count : Int32 = 1, verbose : Bool = true, sequence : Array(Char) | Nil = nil)
If need be, all the default settings can be set in the constructor
Instance Method Summary
-
#count : Int32
Returns
Int32
count of games to be played -
#sequence : Array(Char)?
Returns
(Array(Char) | Nil)
a sequence like['d', 'l', 'r', 'u']
to perform moves in preference: down, left, right, up -
#size : Int32
Returns
Int32
size of the board -
#verbose : Bool
Returns
Bool
true or false for printing output
Constructor Detail
def self.new(size : Int32 = 4, count : Int32 = 1, verbose : Bool = true, sequence : Array(Char) | Nil = nil)
#
If need be, all the default settings can be set in the constructor
Instance Method Detail
def sequence : Array(Char)?
#
Returns (Array(Char) | Nil)
a sequence like ['d', 'l', 'r', 'u']
to perform moves in preference: down, left, right, up