Skip to content

Commit

Permalink
Added notes from class
Browse files Browse the repository at this point in the history
  • Loading branch information
acareaga committed Feb 8, 2016
1 parent 0e49ab3 commit 931ad3c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
9 changes: 9 additions & 0 deletions lib/add-two.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function addTwo(n) {
return n + 2;
};

addTwo.prototype.whatever = function() {
// something
};

module.exports = addTwo;
18 changes: 18 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@

var addTwo = require('./add-two');

addTwo(5);

// Project Folder - https://github.com/turingschool/ruby-submissions/tree/master/1508/module_4_assignments/gametime
// Checkin 1 - https://github.com/turingschool/ruby-submissions/blob/master/1508/module_4_assignments/gametime/template/check_in1.markdown

// Resources:
// https://babeljs.io/docs/learn-es2015/#iterators-for-of
// https://webpack.github.io/docs/tutorials/getting-started/

// Commands:
// npm test / start / run add-two / run build

// Advice:
// Start small with components, keep business logic off canvas
// UI -- (canvas, events, bootstrapping) is really hard to test
// Business Logic -- "the Universe", entity of game (blocks, pieces, etc.)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "game-time-starter-kit",
"name": "tetris",
"version": "1.0.0",
"description": "A starter kit for Turing School's Game Time project.",
"description": "Tetris, the game.",
"main": "index.js",
"scripts": {
"start": "./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
Expand Down
9 changes: 9 additions & 0 deletions test/add-two-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var assert = require('chai').assert;
var addTwo = require('../lib/add-two');


describe('addTwo', function(){
it('should add two to a number', function(){
assert.strictEqual(4, addTwo(2));
})
})
1 change: 1 addition & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('./add-two-test');

0 comments on commit 931ad3c

Please sign in to comment.