/myhunt/minehunt; VERSION
This commit is contained in:
parent
ed5f034bee
commit
ffb5eda987
2 changed files with 6 additions and 4 deletions
|
@ -8,7 +8,7 @@ gemfile do
|
||||||
gem 'curses'
|
gem 'curses'
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'myhunt'
|
require 'minehunt'
|
||||||
|
|
||||||
def display_curses( field,
|
def display_curses( field,
|
||||||
state = { dead: false, victory: false },
|
state = { dead: false, victory: false },
|
||||||
|
@ -49,7 +49,7 @@ def display_curses( field,
|
||||||
end
|
end
|
||||||
|
|
||||||
def ncurses_main( number_of_mines )
|
def ncurses_main( number_of_mines )
|
||||||
field = MyHunt::Board.new( number_of_mines )
|
field = MineHunt::Board.new( number_of_mines )
|
||||||
finished = false
|
finished = false
|
||||||
|
|
||||||
Curses.init_screen
|
Curses.init_screen
|
||||||
|
@ -70,7 +70,7 @@ def ncurses_main( number_of_mines )
|
||||||
begin
|
begin
|
||||||
case ch
|
case ch
|
||||||
when 'r'
|
when 'r'
|
||||||
field = MyHunt::Board.new( number_of_mines )
|
field = MineHunt::Board.new( number_of_mines )
|
||||||
finished = false
|
finished = false
|
||||||
else
|
else
|
||||||
break
|
break
|
|
@ -1,7 +1,9 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module MyHunt
|
module MineHunt
|
||||||
|
VERSION = '1.0.0'
|
||||||
|
|
||||||
class Cell
|
class Cell
|
||||||
attr_accessor :mine,
|
attr_accessor :mine,
|
||||||
:open
|
:open
|
Loading…
Reference in a new issue