⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative 'hangman_class' | |
require 'test/unit' | |
class TestHangman < Test::Unit::TestCase | |
def test_startup_value | |
Hangman.class_eval do | |
attr_accessor :words, :finish, :limit, :win | |
end | |
hangman = Hangman.new | |
assert(hangman.words.length > 0, "should have more than one in dictionary") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative 'hangman_class_2' | |
hangman = Hangman.new | |
hangman.start do | |
puts hangman.answer | |
print "#{hangman.limit} Enter your best guest: " | |
hangman.guess(gets) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative 'hangman_class' | |
hangman = Hangman.new | |
hangman.start | |
until hangman.finish | |
puts hangman.answer | |
print "#{hangman.limit} Enter your best guess: " | |
hangman.guess(gets) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 2; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
NewerOlder