-
@constructor Chess
: Setup aboard
withPieces
representing an initial chessboard.-
@method getPlayer()
-
@return String either "white" or "black" representing current player
-
-
@method move(piece, destination)
: Movepiece
todestination
and...?-
@param Piece piece to move
-
@param Position destination to move piece to
-
-
@method opening()
: Advance theboard
to Catalan Opening, Closed Variation
-
-
@method display()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | |
<link rel="stylesheet" href="24--Product-Grid.css"> | |
</head> | |
<body> | |
<div id="container"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Main Controller | |
=============== | |
var user = $firebase(Firebase | |
.child('users') | |
.child(authdUser.facebook.id) | |
).$asObject(); | |
angular.extend(user, { | |
uid: authdUser.facebook.id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
angular.module('routeApp') | |
.controller('AnoCtrl', function(){ | |
console.log('Goodbye'); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="no-js" ng-app="randomInfo"> | |
<head> | |
<meta charset="utf-8"> | |
<title>randomInfo</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> | |
<!-- build:css({.tmp/serve,src}) styles/vendor.css --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="login"> | |
<button class="btn btn-info col-xs-12" ng-click="app.twitLogin()">Twitter</button> | |
<button class="btn btn-primary col-xs-12" ng-click="app.fbLogin()">Facebook</button> | |
<button class="btn btn-success col-xs-12" ng-click="app.ghLogin()">Github</button> | |
<button class="btn btn-danger col-xs-12" ng-click="app.logout()">Logout</button> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--This will be available at the | |
url: /users/:id(or {id}) where id is the | |
hash or directory that you dynamically set--> | |
<section id="users"> | |
<div> | |
<h2>{{users.userInfo.name}}</h2> | |
<p>{{users.userInfo.email}}</p> | |
<p>{{users.userInfo.age}}</p> | |
</div> |
- Closure: In the code snippet you sent below the approach is clear but you have run into something called
Closure
. What you are attempting to do here is to create a different environment for eachonclick
event so that wealert()
a different message, however, because of the createdclosure
we are actually telling our 3 buttons to share the parent environment. This means that by the time any of our buttons are clicked the loop has completed reaches an index of 3 which isundefined
in our array of strings since arrays are zero indexed in javascript.
You should research a little about Closures
and see if you can identify how to create a unique environment for each button.
<button id="btn-0">Button 1!</button>
<button id="btn-1">Button 2!</button>
<button id="btn-2">Button 3!</button>
NOTE: Currently all of these require going through these collections that are returned and wrapping them in an Object.
This helps to just get the cleaned up tags from the imported format in the console
const tags = [Array of Tag Objects];
tags.forEach(parseTags);
function parseTags(tag) {
var result = 'tags {\n';