class Minesweeper::Console::Parser::RevealCommand

Public Class Methods

new(a_minefield, x, y) click to toggle source
# File lib/minesweeper/console/parser/reveal_command.rb, line 5
def initialize(a_minefield, x, y)
  @minefield = a_minefield
  @row_index = x
  @column_index = y
end

Public Instance Methods

execute() click to toggle source
# File lib/minesweeper/console/parser/reveal_command.rb, line 11
def execute
  @minefield.reveal_at(@row_index, @column_index)
end