class Synacor::RunCommand

Defined in:

synacor/run_command.cr

Constant Summary

INVALID_VALUE = MAX_VALUE + 8
MAX_VALUE = (2 ** 15).to_u16
REGISTERS = MAX_VALUE...INVALID_VALUE

Class Method Summary

Instance Method Summary

Class Method Detail

def self.solve_coin_problem #

[View source]

Instance Method Detail

def configure : Nil #
Description copied from class Athena::Console::Command

Can be overridden to configure the current command, such as setting the name, adding arguments/options, setting help information etc.


[View source]
def execute(input : ACON::Input::Interface, output : ACON::Output::Interface) : ACON::Command::Status #
Description copied from class Athena::Console::Command

Executes the command with the provided input and output, returning the status of the invocation via ACON::Command::Status.

This method MUST be defined and implement the business logic for the command.


[View source]
def fetch_register : Int32 #

[View source]
def fetch_value : UInt16 #

[View source]
def line_buffer : Deque(Char) #

[View source]
def line_buffer=(line_buffer : Deque(Char)) #

[View source]
def line_cache : String #

[View source]
def line_cache=(line_cache : String) #

[View source]
def reading_buffer=(reading_buffer : Bool) #

[View source]
def reading_buffer? : Bool #

[View source]
def setup(input : ACON::Input::Interface, output : ACON::Output::Interface) : Nil #
Description copied from class Athena::Console::Command

Called after the input has been bound, but before it has been validated. Can be used to setup state of the command based on the provided input data.


[View source]