Skip to content

Instantly share code, notes, and snippets.

View RBazelais's full-sized avatar

Rachél Bazelais RBazelais

View GitHub Profile
@RBazelais
RBazelais / tictactoe
Last active February 16, 2017 13:02
Making an unbeatable game of tic tac toe and learning minimax algorithm
var tiles = document.getElementsByClassName('tile');
//get array of board tiles by className
var buttons = document.getElementsByClassName('button');
//get array of buttons by className
var state = [0, 0, 0, 0, 0, 0, 0, 0, 0];
// 0 will be the empty tile
var game = true;
@RBazelais
RBazelais / SquareIt.txt
Last active October 29, 2016 21:47
Practice Question
/*
Programming Challenge Description:
Write a program that squares an integer and prints the result.
Input:
Your program should read lines from standard input. Each line will contain a positive integer.
Output:
For each line of input, print to standard output the square of the number. Print out each result on a new line.
*/
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div id="page-wrap">