One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
class TicTacToe { | |
constructor(size) { | |
this.size = size | |
this.center = Math.floor(this.size / 2) | |
this.state = { | |
board: [], | |
score: [], | |
move: 0, | |
} |
class StackSet { | |
constructor(maxSize) { | |
if (arguments.length < 1) { | |
throw new Error ('Woops, maxSize is required!') | |
} | |
this.stacks = [[]] | |
this.maxSize = maxSize | |
} | |
const INITIAL_STATE = {}; | |
export default (state = INITIAL_STATE, action) => { | |
switch (action.type) { | |
case ACTION_TYPE: { | |
const newState = {}; | |
return {...state, ...newState}; | |
} | |
default: | |
return state; |
import React from 'react'; | |
import { Route, Redirect } from 'react-router-dom'; | |
const PrivateRoute = ({ component: Component, authed, ...rest }) => ( | |
<Route | |
{...rest} | |
render={props => ( | |
authed | |
? <Component {...props} /> | |
: <Redirect to="/login" /> |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const app = express(); | |
const routes = require('./routes'); | |
app.use(bodyParser.json()); | |
app.use(express.static(`${__dirname}/public`)); | |
routes(app); |
// Atom Sync Settings |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import registerServiceWorker from './registerServiceWorker'; | |
import axios from 'axios'; | |
class Board extends React.Component { | |
constructor(props) { | |
super(props); |
// My answers to the exercises in Eloquent Javascript | |
// Looping a triangle | |
var myStr = ''; | |
for (var i = 1; i < 7; i++){ | |
console.log(myStr += "#"); | |
} |
[ | |
{ | |
"quote": "I will be the greatest jobs president that God ever created.", | |
"author": "Donald Trump", | |
"index": 1}, | |
{ | |
"quote": "When Mexico sends its people, they're not sending their best. They're sending people that have lots of problems...they're bringing drugs, they're bringing crime. They're rapists.", | |
"author": "Donald Trump", | |
"index": 2 | |
}, { |