Skip to content

Instantly share code, notes, and snippets.

View arbianchi's full-sized avatar

Adina Bianchi arbianchi

View GitHub Profile
@arbianchi
arbianchi / cry.html
Created June 17, 2017 15:33
Crystal Game feedback
<!DOCTYPE html>
<html>
<head>
<title>Crystal Collector HW</title>
<link rel="stylesheet" type="text/css" href="assets/css/crystal.css">
<link rel="stylesheet" type="text/css" href="crystal.css">
@arbianchi
arbianchi / game.js
Created June 17, 2017 16:58
Crystal Game feedback
$(document).ready(function() {
var globalCount = 0;
var RED = 0;
var PURPLE = 0;
var GREEN = 0;
var CLEAR = 0;
// ADINA: Why start WINS and LOSSES at 1?
var WINS = 1;
var LOSSES = 1;
@arbianchi
arbianchi / app.js
Created June 21, 2017 23:38
Trivia Game Feedback
// ADINA: This structure works but a constructor object would help you avoid repeating code. It would look something like this:
// var questions = [];
// function question(question, answers, correctAnswer) {
// this.question = question;
// this.answers = answers;
// this.correctAnswer = correctAnswer;
// questions.push(this);
// }
@arbianchi
arbianchi / app.js
Created June 24, 2017 14:46
Trivia Game feedback
// ADINA: This structure works but a constructor object would help you avoid repeating code. It would look something like this:
//
// // var questions = [];
// // function question(question, answers, correctAnswer) {
// // this.question = question;
// // this.answers = answers;
// // this.correctAnswer = correctAnswer;
// // questions.push(this);
// // }
//
@arbianchi
arbianchi / game.js
Created June 24, 2017 15:16
Trivia Game Feedback
//ADINA: Using an array for storing questions/answers but a constructor object would help you avoid repeating code. It would look something like this:
// var questions = [];
// function question(question, answers, correctAnswer) {
// this.question = question;
// this.answers = answers;
// this.correctAnswer = correctAnswer;
// questions.push(this);
// }
@arbianchi
arbianchi / app.js
Created June 24, 2017 15:28
Trivia Game Feedback
//ADINA: Using an array for storing questions/answers but a constructor object would help you avoid repeating code. It would look something like this:
//
// var questions = [];
// function question(question, answers, correctAnswer) {
// this.question = question;
// this.answers = answers;
// this.correctAnswer = correctAnswer;
// questions.push(this);
// }
@arbianchi
arbianchi / game.js
Created June 24, 2017 15:47
Trivia Game Feedback
// ADINA: This structure works but a constructor object would help you avoid repeating code. It would look something like this:
// var questions = [];
// function question(question, answers, correctAnswer) {
// this.question = question;
// this.answers = answers;
// this.correctAnswer = correctAnswer;
// questions.push(this);
// }
@arbianchi
arbianchi / app.js
Created June 24, 2017 17:29
Trivia Game Feedback
// ADINA: What you did definitely works, but if you wanted to dynamically generate the input elements with javascript, this is how you would do it:
// var questions = [{
// question: "What was the first full length CGI movie?",
// answers: ["A Bug's Life", "Monsters Inc.", "Toy Story", "The Lion King"],
// correctAnswer: "Toy Story"
// }, {
// question: "Which of these is NOT a name of one of the Spice Girls?",
// answers: ["Sporty Spice", "Fred Spice", "Scary Spice", "Posh Spice"],
// correctAnswer: "Fred Spice"
@arbianchi
arbianchi / app.js
Created June 26, 2017 21:07
Trivia Game Feedback
// ADINA: What you did definitely works, but if you wanted to dynamically generate the input elements with javascript, this is how you would do it:
// var questions = [{
// question: "What was the first full length CGI movie?",
// answers: ["A Bug's Life", "Monsters Inc.", "Toy Story", "The Lion King"],
// correctAnswer: "Toy Story"
// }, {
// question: "Which of these is NOT a name of one of the Spice Girls?",
// answers: ["Sporty Spice", "Fred Spice", "Scary Spice", "Posh Spice"],
// correctAnswer: "Fred Spice"
@arbianchi
arbianchi / app.js
Created June 28, 2017 23:06
Giphy Homework Feedback
$(document).ready(function(){
//Declare topics
var topics = ["Spongebob", "Patrick", "Rick and Morty", "Peter Griffin", "Stewie Griffin", "Quagmire"];
//Make initial buttons
for (i=0; i<topics.length; i++) {
makeButton(topics[i]);
}
//Make form for new button