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
// autoexec.cfg | |
// ============ | |
// = Bindings = | |
// ============ | |
bind "kp_end" "buy ak47; buy m4a1;" | |
bind "kp_downarrow" "buy galilar; buy famas;" | |
bind "kp_pgdn" "buy awp;" | |
bind "kp_leftarrow" "buy bizon;" |
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
# TODO: Create InvalidCard, DuplicateCard & InvalidDeck exceptions | |
class Card | |
# 11 - 14 represent Jack through Ace respectively | |
VALUES = (2..14).to_a | |
SUITS = [:spades, :clubs, :hearts, :diamonds] | |
attr_reader :value, :suit | |
def initialize value, suit |
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
# Problem Statement | |
# Create a class Calculator, which performs addition and subtraction of two numbers at a time. | |
class Calculator | |
def add(a, b) | |
a+b | |
end | |
def subtract(a, b) | |
a-b | |
end |