Skip to content

Instantly share code, notes, and snippets.

View luketlancaster's full-sized avatar
🤷‍♂️
🤷🏻‍♂️

Luke Lancaster luketlancaster

🤷‍♂️
🤷🏻‍♂️
View GitHub Profile
puts "Hello, What's your name?"
name = gets.chomp.upcase
# Loop through each letter in their name and grammar it.
for letter in name.split("") do
if letter == "A" or letter == "E" or letter == "F" or letter == "H" or letter == "I" or letter == "L" or letter == "M" or letter == "N" or letter == "O" or letter == "R" or letter == "S" or letter == "X"
article = "an"
else
article = "a"
end
puts "Give me "+ article + "... " + letter + "!"
#############################################################################
# https://github.com/github/gitignore/blob/master/Global/Archives.gitignore #
#############################################################################
# It's better to unpack these files and commit the raw source because
# git has its own built in compression methods.
*.7z
*.jar
*.rar
*.zip
*.gz
@luketlancaster
luketlancaster / game.js
Last active August 29, 2015 14:13 — forked from sscotth/game.js
function Game(numberOfPlayers){
this.weapons = [];
this.weapons.push(new Weapon({name: 'Sword', damage: 0.2, ammo: Infinity}));
this.weapons.push(new Weapon({name: 'Shotgun', damage: 0.6, ammo: 1}));
this.weapons.push(new Weapon({name: 'Fist', damage: 0.05, ammo: Infinity}));
this.players = [];
for (var i=0; i < numberOfPlayers; i++){
var player = new Player;