This file contains hidden or 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
| # Cute Cat | |
| by: yaboi | |
| what: This is a cute cat, I think | |
| ## Legend | |
| d = dirt | |
| e = empty | |
| f = fire | |
| c = cobblestone |
This file contains hidden or 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
| /* Here is your chance to take over Socrates! | |
| Spend 10 minutes on each of the following hacks to the socrates website. | |
| Enter them in the console to make sure it works and then save | |
| your results here. | |
| Choose a new pair for each. Add your names to the section you complete. | |
| */ |
This file contains hidden or 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
| <!doctype html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
| <link rel="stylesheet" href="main.css"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
| <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
| </head> |
This file contains hidden or 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
| class Vehicle | |
| attr_reader :status, :wheels, :color | |
| def initialize(args) | |
| @color = args[:color] | |
| @wheels = args[:wheels] | |
| @gas_chance = args[:gas_chance] | |
| @status = :stopped | |
| end |
This file contains hidden or 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
| def generate_board(size) | |
| x_count = (size * size) / 2 | |
| o_count = (size * size) - x_count | |
| board = Array.new(size) {Array.new(size)} | |
| size.times do |row_ind| | |
| size.times do |col_ind| | |
| if x_count == 0 |
This file contains hidden or 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
| def to_roman(num) | |
| roman = {1000 => "M", | |
| 900 => "CM", | |
| 100 => "C", | |
| 90 => "LC", | |
| 50 => "L", | |
| 40 => "XL", | |
| 10 => "X", | |
| 9 => "IX", | |
| 5 => "IV", |
This file contains hidden or 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
| # Save this file to your computer so you can run it | |
| # via the command line (Terminal) like so: | |
| # $ ruby deaf_grandma.rb | |
| # | |
| # Your method should wait for user input, which corresponds | |
| # to you saying something to your Grandma. | |
| # You'll probably want to write other methods, but this | |
| # encapsulates the core Grandma logic | |
| def deaf_grandma |