Skip to content

Instantly share code, notes, and snippets.

View martinbee's full-sized avatar

Martin Bee martinbee

  • Goco
  • Houston, Texas
View GitHub Profile
@martinbee
martinbee / Day-22 Homework
Created June 2, 2015 22:18
TIY Day 22 Homework
https://github.com/martinbee/Homework-6-2
create table population
(place_name varchar, 2013_estimate number(8), 2010_census number(8), percent_change decimal(3,2));
insert into population
(place_name, 2013_estimate, 2010_census, percent_change)
values
('Houston', 2195914, 2100263, 4.55),
('San Antonio', 1409019, 1327407, 6.15),
('Dallas', 1257676, 197816, 5.00),
('Austin', 885400, 790390, 12.02),
@martinbee
martinbee / Homework day 16
Last active August 29, 2015 14:22
day-16-class
Link to repo: https://github.com/martinbee/Homework-5-27
@martinbee
martinbee / First_attempt.rb
Last active August 29, 2015 14:21
Homework day 11
# My first attempt during class
class String
def only_letters?
self.split.last.to_f == 0
end
def question?
self.end_with?("?")
@martinbee
martinbee / Card.rb
Created May 18, 2015 01:53
Week 2 Lab
class Card
attr_accessor :card, :suit, :value
def initialize(card, suit)
@card = card
@suit = suit
@value = value
end
@martinbee
martinbee / day-8-class.rb
Created May 14, 2015 00:01
Homework day 8
class Person
include ObjectToString
attr_accessor :first, :last, :santa, :info, :people, :people_without_santas
def initialize(first, last)
@first = first
@last = last
@santa = santa
@info = []
@martinbee
martinbee / day-7-rps.rb
Last active August 29, 2015 14:21
Full Rock Paper Scissors game with main menu and 1 player, 2 players, and AI vs. AI options
require './rps_1_player'
require './rps_ai'
require './rps_2_players'
run = true
while run == true
puts "Bee Programming Presents.... RPS!"
puts
puts "This program has three options:"
@martinbee
martinbee / day-7-class_game_extreme.rb
Created May 13, 2015 00:27
Homework day 7 extreme
class GameExtreme
attr_accessor :battle_number, :robot_1, :robot_2, :robot_1_count, :robot_2_count, :tie_count
def intro
puts
puts "Welcome to the RPS Simulator 90000001!!!!"
puts
puts "In this simulator, you will be choosing the number of times you want to see"
puts "completely real digital robots battle to the death!... With rock, paper, and scissors!"
puts
@martinbee
martinbee / day-7-class_game.rb
Last active August 29, 2015 14:21
Homework day 7 normal mode
class Game
attr_accessor :player_one_choice, :computer_choice, :winner, :run
def intro
puts
puts "Welcome to RPS Simulator 90000000!!!!"
puts
puts "You will be playing versus the dreaded Computer!"
puts
puts "Choose your moves wisely and you might make it out alive!"
@martinbee
martinbee / day-6.rb
Last active August 29, 2015 14:20
Homework day 6
# Pandas: name, greeting, Eat, asleep, sleep, wake
# widget: name, greeting, start, end, asleep
# robot: name, greeting, start, end, terminator
# Modules
module Alive
def eat(food)
puts "Yum, I ate #{food}!"