Skip to content

Instantly share code, notes, and snippets.

# Cute Cat
by: yaboi
what: This is a cute cat, I think
## Legend
d = dirt
e = empty
f = fire
c = cobblestone
/* 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.
*/
@ClintFMullins
ClintFMullins / index.html
Last active December 19, 2015 19:19 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!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>
class Vehicle
attr_reader :status, :wheels, :color
def initialize(args)
@color = args[:color]
@wheels = args[:wheels]
@gas_chance = args[:gas_chance]
@status = :stopped
end
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
def to_roman(num)
roman = {1000 => "M",
900 => "CM",
100 => "C",
90 => "LC",
50 => "L",
40 => "XL",
10 => "X",
9 => "IX",
5 => "IV",
# 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