struct TwentyFortyEight::Options

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.cr

Constructors

Instance Method Summary

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


[View source]

Instance Method Detail

def count : Int32 #

Returns Int32 count of games to be played


[View source]
def sequence : Array(Char)? #

Returns (Array(Char) | Nil) a sequence like ['d', 'l', 'r', 'u'] to perform moves in preference: down, left, right, up


[View source]
def size : Int32 #

Returns Int32 size of the board


[View source]
def verbose : Bool #

Returns Bool true or false for printing output


[View source]