homework and morning exercise

master
Kristyn Bryan 10 years ago
parent c9ee4ef09a
commit 072d820366

@ -1,88 +0,0 @@
# ![](https://ga-dash.s3.amazonaws.com/production/assets/logo-9f88ae6c9c3871690e33280fcf557f33.png) Project #1: The Game
### Overview
Let's start out with something fun - **a game!**
Everyone will get a chance to **be creative**, and work through some really **tough programming challenges** since you've already gotten your feet wet with Tic Tac Toe, it's up to you to come up with a fun and interesting game to build.
**You will be working individually for this project**, but we'll be guiding you along the process and helping as you go. Show us what you've got!
---
### Technical Requirements
Your app must:
* **Render a game in the browser**
* **Switch turns** between two players
* **Design logic for winning** & **visually display which player won**
* **Include separate HTML / CSS / JavaScript files**
* Stick with **KISS (Keep It Simple Stupid)** and **DRY (Don't Repeat Yourself)** principles
* Use **Javascript or jQuery** for **DOM manipulation**
* **Deploy your game online**, where the rest of the world can access it
* Use **semantic markup** for HTML and CSS (adhere to best practices)
---
### Necessary Deliverables
* A **working game, built by you**, hosted somewhere on the internet
* A **link to your hosted working game** in the URL section of your GitHub repo
* A **git repository hosted on GitHub**, with a link to your hosted game, and frequent commits dating back to the very beginning of the project
* **A ``readme.md`` file** with explanations of the technologies used, the approach taken, installation instructions, unsolved problems, etc.
---
### Suggested Ways to Get Started
* **Break the project down into different components** (data, presentation, views, style, DOM manipulation) and brainstorm each component individually. Use whiteboards!
* **Use your Development Tools** (console.log, inspector, alert statements, etc) to debug and solve problems
* Work through the lessons in class & ask questions when you need to! Think about adding relevant code to your game each night, instead of, you know... _procrastinating_.
* **Commit early, commit often.** Dont be afraid to break something because you can always go back in time to a previous version.
* **Consult documentation resources** (MDN, jQuery, etc.) at home to better understand what youll be getting into.
* **Dont be afraid to write code that you know you will have to remove later.** Create temporary elements (buttons, links, etc) that trigger events if real data is not available. For example, if youre trying to figure out how to change some text when the game is over but you havent solved the win/lose game logic, you can create a button to simulate that until then.
---
### Potential Project Ideas
##### Blackjack
Make a one player game where people down on their luck can lose all their money by guessing which card the computer will deal next!
##### Self-scoring Trivia
Test your wits & knowledge with whatever-the-heck you know about (so you can actually win). Guess answers, have the computer tell you how right you are!
---
### Useful Resources
* **[MDN Javascript Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript)** _(a great reference for all things Vanilla Javascript)_
* **[jQuery Docs](http://api.jquery.com)** _(if you're using jQuery)_
* **[GitHub Pages](https://pages.github.com)** _(for hosting your game)_
---
### Project Feedback + Evaluation
* __Project Workflow__: Did you complete the user stories, wireframes, task tracking, and/or ERDs, as specified above? Did you use source control as expected for the phase of the program youre in (detailed above)?
* __Technical Requirements__: Did you deliver a project that met all the technical requirements? Given what the class has covered so far, did you build something that was reasonably complex?
* __Creativity__: Did you add a personal spin or creative element into your project submission? Did you deliver something of value to the end user (not just a login button and an index page)?
* __Code Quality__: Did you follow code style guidance and best practices covered in class, such as spacing, modularity, and semantic naming? Did you comment your code as your instructors have in class?
* __Deployment__: Did you deploy your application to a public url using GitHub Pages?
* __Total__: Your instructors will give you a total score on your project between:
Score | Expectations
----- | ------------
**0** | _Incomplete._
**1** | _Does not meet expectations._
**2** | _Meets expectations, good job!_
**3** | _Exceeds expectations, you wonderful creature, you!_
This will serve as a helpful overall gauge of whether you met the project goals, but __the more important scores are the individual ones__ above, which can help you identify where to focus your efforts for the next project!

@ -1,106 +0,0 @@
# ![](https://ga-dash.s3.amazonaws.com/production/assets/logo-9f88ae6c9c3871690e33280fcf557f33.png) Project #1: The Game
## Overview of `blackjack.js`
![](http://upload.wikimedia.org/wikipedia/commons/4/4b/Blackjack_board.JPG)
### The game
[Blackjack](http://en.wikipedia.org/wiki/Blackjack) is a one player game where people down on their luck generally transform their lives. It's probably a thing in your universe, but feel free to read up on it if you have to.
## Project Details
### Basic features
A basic implementation of this project should probably include:
1. A way to keep track of the current player bankroll ( a player should be able to play multiple hands and the bankroll should reflect wins and losses)
2. A way for players to make a bet
3. A way for players to get more cards, or declare themselves happy with their current hand
4. A way for players to bust
5. A way for players to win or tie
6. Game logic for the dealer to hit until a certain point
### Advanced features
Going above and beyond the basic implementation is desirable, should you have the time. Feel free to enhance your project with any of the following features:
1. A button on `game over` to reset the game back to initial state
2. A way for players to 'split' a hand
3. A way for players to 'double down' on a hand
4. Appropriate handling of 'insurance' and dealer blackjack
## Implementation
### Technologies
You will be expected to use the following technologies to implement this project:
- **HTML**
Your HTML should be semantic.
- **CSS**
Your game should be stylish.
- **JavaScript & jQuery**
Your game should be playable *and* responsive.
### Timeframe
The timeframe for this project is approximately 2 continuous days of class time and two weekend days.
## Expectations
### You
As a student you should be doing the following things:
- **Planning **
Plan out your project before you begin. What data structures will you need (objects, arrays)? What layout will your project have on the page (you could make a wireframe)? How will you organize your code? Pseudo-code out any thorny issues you might already anticipate.
- **Version Control**
Use **git** and **github** for version control, and make frequent incremental commits to prevent large scale implosions. Make a fresh repo outside the wdi-lettuce repo for your project so that
it will be public.
- **Hosting**
Host your application on **githubpages**, or something similar so the class and instructors can use it.
### Us
Since your instructors will be assessing your work, they will look for the following things:
- **Project Workflow**
Did you you plan your project before you started? Did you use source control as expected for the phase of the program youre in (detailed above)?
- **Technical Requirements**
Did you deliver a project that met all the technical requirements? Given what the class has covered so far, did you build something that was reasonably complex?
- **Creativity**
Did you add a personal spin or creative element into your project submission? Did you deliver something of value to the end user?
- **Code Quality**
Did you follow code style guidance and best practices covered in class, such as spacing, modularity, and semantic naming? Did you comment your code as your instructors have in class?
- **Problem Solving**
Are you able to defend why you implemented your solution in a certain way? Can you demonstrate that you thought through alternative implementations? (Note that this part of your feedback evaluation will take place during your one-on-one code review with your instructors, after you've completed the project.)
## Deliverables
By the time the project is over, we will expect the following from you:
* A **working game, built by you**, hosted somewhere on the internet
* A **link to your hosted working app** in the URL section of your Github repo
* A **git repository hosted on Github**, with a link to your hosted project, and frequent commits dating back to the very beginning of the project
* **A ``readme.md`` file** with explanations of the technologies used, the approach taken, installation instructions, unsolved problems, etc.
Most importantly a **technical demonstration** of your app which:
* Is 5 minutes in length
* Shows off all features of the app
* Explains the technical details
* Explains the technical challenges
* Explains which improvements you might make

@ -1,107 +0,0 @@
# ![]() Project #1: The Game
## Overview of `connect four`
![](http://uncannyflats.com/wp-content/uploads/2013/12/connect-4.jpg)
### The game
[Connect Four](https://en.wikipedia.org/wiki/Connect_Four) is a two-player adventure of mystery, mayhem, and intrigue. It's probably a thing in your universe, but feel free to read up on it if you have to.
## Project Details
### Necessary features
A basic implementation of this project must include:
1. An interactive board which renders on page load
2. A way for players to set their name
3. A way for players to mark an empty space on their turn
4. The game should end when there is a winner, or if the game is a tie
5. The game should report the end state
Additionally you should use CSS to ensure a reasonable amount of styling to keep your project presentable.
### Advanced features
Going above and beyond the basic implementation is desirable, should you have the time. Feel free to enhance your project with any of the following features:
1. A button on `game over` to reset the game back to initial state
2. A way to keep track of Player 1 vs. Player 2 wins
- An option to play vs. a computer with AI
- Level 1: Random empty space is good enough
- Level 2: Computer chooses a space which immediately blocks a player win
3. Add in the ability to store a game to play later. This might use Firebase or local storage to do so.
4. Add in the ability to play live with somebody remotely. This will definitely need to use [Firebase](https://www.firebase.com/).
## Implementation
### Technologies
You will be expected to use the following technologies to implement this project:
- **HTML**
Your HTML should be semantic.
- **CSS**
Your game should be stylish.
- **JavaScript & jQuery**
Your game should be playable *and* responsive.
### Timeframe
The timeframe for this project is approximately 2 continuous days of class time and two weekend days.
## Expectations
### You
As a student you should be doing the following things:
- **Planning **
Plan out your project before you begin. What data structures will you need (objects, arrays)? What layout will your project have on the page (you could make a wireframe)? How will you organize your code? Pseudo-code out any thorny issues you might already anticipate.
- **Version Control**
Use **git** and **github** for version control, and make frequent incremental commits to prevent large scale implosions. Make a fresh repo outside the wdi-lettuce repo for your project so that
it will be public.
- **Hosting**
Host your application on **githubpages**, or something similar so the class and instructors can use it.
### Us
Since your instructors will be assessing your work, they will look for the following things:
- **Project Workflow**
Did you you plan your project before you started? Did you use source control as expected for the phase of the program youre in (detailed above)?
- **Technical Requirements**
Did you deliver a project that met all the technical requirements? Given what the class has covered so far, did you build something that was reasonably complex?
- **Creativity**
Did you add a personal spin or creative element into your project submission? Did you deliver something of value to the end user?
- **Code Quality**
Did you follow code style guidance and best practices covered in class, such as spacing, modularity, and semantic naming? Did you comment your code as your instructors have in class?
- **Problem Solving**
Are you able to defend why you implemented your solution in a certain way? Can you demonstrate that you thought through alternative implementations? (Note that this part of your feedback evaluation will take place during your one-on-one code review with your instructors, after you've completed the project.)
## Deliverables
By the time the project is over, we will expect the following from you:
* A **working game, built by you**, hosted somewhere on the internet
* A **link to your hosted working app** in the URL section of your Github repo
* A **git repository hosted on Github**, with a link to your hosted project, and frequent commits dating back to the very beginning of the project
* **A ``readme.md`` file** with explanations of the technologies used, the approach taken, installation instructions, unsolved problems, etc.
Most importantly a **technical demonstration** of your app which:
* Is 5 minutes in length
* Shows off all features of the app
* Explains the technical details
* Explains the technical challenges
* Explains which improvements you might make

@ -1,7 +1,7 @@
// words = ["Ho", "Chi", "Minh", "City", "was", "once", "known", "as", "Prey", "Nokor"];
//
// words.forEach(function (e){
// console.log(e.toUpperCase());
// words.forEach(function (each_word){
// console.log(each_word.toUpperCase());
// });
@ -28,25 +28,26 @@
// console.log(new_value);
/////////////////////
var sheepShearers = [
{
name: "Tim",
age: 20,
sheepCount: 18
},
{
name: "C3PO",
age: 200,
sheepCount: 320
},
{
name: "Cousin It",
age: Infinity,
sheepCount: 2900
}
];
var total = sheepShearers.map(function(e){return e.sheepCount})).reduce(function(sum, num) {resturn sum += num;});
console.log (total);
//
// var sheepShearers = [
// {
// name: "Tim",
// age: 20,
// sheepCount: 18
// },
// {
// name: "C3PO",
// age: 200,
// sheepCount: 320
// },
// {
// name: "Cousin It",
// age: Infinity,
// sheepCount: 2900
// }
// ];
//
// var total = sheepShearers.map(function(e){return e.sheepCount});
// .reduce(function(sum, num) {return sum += num;});
//
// console.log (total);

@ -39,10 +39,9 @@ body {
}
#to-do-list {
width: 380px; height: 600px;
width: 380px; height: 600px;
}
#completed {
width: 380px; height: 600px;
width: 380px; height: 600px;
}

Loading…
Cancel
Save