Skip to content

Instantly share code, notes, and snippets.

View petternordholm's full-sized avatar

Petter Nordholm petternordholm

View GitHub Profile
@petternordholm
petternordholm / board.js
Last active August 29, 2015 14:22 — forked from d-git/board.js
function Board() {
this.isWinner = isWinner;
this.placePiece = placePiece;
var GOAL = 5, winnerIs, values = {'white': {}, 'black': {}};
function placePiece(col, row, player) {
values[player][col + '-' + row] = 1;
}