Skip to content

Instantly share code, notes, and snippets.

View molayodecker's full-sized avatar
💭
Wasn’t born with a broadsword in hand but was forced to learn how to wield one

Arthur Decker molayodecker

💭
Wasn’t born with a broadsword in hand but was forced to learn how to wield one
View GitHub Profile
@molayodecker
molayodecker / Game.java
Last active December 10, 2016 13:07
Recurse Pair Interview Programming tasks
/**
* Created by molayodecker on 28/11/2016.
* Welcome
* Before your interview, write a program that lets two humans play a game of Tic Tac Toe in a terminal.
* The program should let the players take turns to input their moves.
* The program should report the outcome of the game.
* During your interview, you will pair on adding support for a computer player to your game.
* You can start with random moves and make the AI smarter if you have time.
*
@molayodecker
molayodecker / Game.java
Last active December 11, 2016 11:15
Recurse Pair Programming Interview tasks
import java.io.IOException;
/**
* Created by molayodecker on 28/11/2016.
* Welcome
* Before your interview, write a program that lets two humans play a game of Tic Tac Toe in a terminal.
* The program should let the players take turns to input their moves.
* The program should report the outcome of the game.
* During your interview, you will pair on adding support for a computer player to your game.
* You can start with random moves and make the AI smarter if you have time.
*
var name = "Elon";
function musk(){
console.log("Hello " + name);
}
musk("Elon Musk"); // Hello Elon Musk
function ice(){
var icecream = "cookie & cream";
console.log(icecream);
}
console.log(icecream);
var icecream = "cookie & cream";
function ice(){
var icecream = "cookie & cream";
console.log(icecream);
}
console.log(icecream); // cookie & cream
var name = "Elon";
function musk(name){
console.log("Hello " + name);
}
musk("Elon Musk"); // Hello Elon Musk
var a = 10;
function outer(){
var b = a;
console.log(b);
function inner(){
var b = 20;
var c = b;
console.log(c);
}
inner();
var name = "Arthur";
function(){
if(name === "Arthur"){
var fullName = "Arthur Decker";
}
}
console.log(fullName);
var name = "Arthur";
if(name === "Arthur"){
var fullName = "Arthur Decker";
}
console.log(name);
console.log(fullName);
var milk = "Organic";
var last;
function outer(){
var withinOuter = "Health"
function inner(){
console.log(milk);
console.log(withinOuter);
}
last = inner;
}