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
| https://github.com/martinbee/Homework-6-2 |
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
| 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), |
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
| Link to repo: https://github.com/martinbee/Homework-5-27 |
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
| # My first attempt during class | |
| class String | |
| def only_letters? | |
| self.split.last.to_f == 0 | |
| end | |
| def question? | |
| self.end_with?("?") |
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 Card | |
| attr_accessor :card, :suit, :value | |
| def initialize(card, suit) | |
| @card = card | |
| @suit = suit | |
| @value = value | |
| 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
| 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 = [] |
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
| 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:" |
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 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 |
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 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!" |
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
| # 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}!" |
NewerOlder