Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jeannie & Yael : Tic-Tac-Tie Wave 1 #6

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
64e10a8
wrote game initialize tests
BJHunnicutt Dec 12, 2016
c7f507f
added game and board classes
BJHunnicutt Dec 13, 2016
1838d2f
added prompt
BJHunnicutt Dec 13, 2016
50fde71
players can play and win a game
BJHunnicutt Dec 13, 2016
9bbf9c1
user cant play on a filled spot
BJHunnicutt Dec 13, 2016
22ca250
Tie games are notes
BJHunnicutt Dec 13, 2016
6e14b77
tests done
yaelittle Dec 13, 2016
ec3c999
Made it so you can't enter an invalid play position
BJHunnicutt Dec 13, 2016
9ae3dda
tested Input validation and cleaned up display
BJHunnicutt Dec 13, 2016
6a5c08a
Merge remote-tracking branch 'upstream/master'
BJHunnicutt Dec 16, 2016
4a1e7f7
test push after fetching upstream
BJHunnicutt Dec 16, 2016
ee90ebe
Created backbone files for models, collections, and views
BJHunnicutt Dec 16, 2016
5074ffe
Added in basic outlines to backbone files
BJHunnicutt Dec 17, 2016
27d7ba4
Set up basic css formatting
BJHunnicutt Dec 18, 2016
333ae7f
Added a tic-tac-tie board to html
BJHunnicutt Dec 18, 2016
34975af
initial backbone setup of a default game configuration
BJHunnicutt Dec 19, 2016
4400e76
All DOM events trigger their functions
BJHunnicutt Dec 19, 2016
1d0a36b
made squares render without divs around them
BJHunnicutt Dec 19, 2016
56c3e4f
Removed unused model and collection that I made initially
BJHunnicutt Dec 19, 2016
bc08f5f
Changed model syntax to use get and set
BJHunnicutt Dec 19, 2016
49f6bc9
Players alternate and play can only play on empty spaces
BJHunnicutt Dec 20, 2016
5d2c040
added emoji for playing and tested formatting but didn't save changes
BJHunnicutt Dec 20, 2016
02cb8c5
event triggered when someone wins to call modal method
BJHunnicutt Dec 21, 2016
85d448a
Game over Modal pops up and closes when you click away from it
BJHunnicutt Dec 21, 2016
ada3351
Displays player names and win history
BJHunnicutt Dec 21, 2016
4dcacdd
Formatted game over modal
BJHunnicutt Dec 21, 2016
20a3857
Each game is saved on api
BJHunnicutt Dec 22, 2016
dedf503
Some final formatting and started trying to add a background interactive
BJHunnicutt Dec 22, 2016
dc379bc
Added p5 interactive background mural and a toggle button
BJHunnicutt Dec 22, 2016
bc157d3
refactored Game model input and downstream dependencies to be compata…
BJHunnicutt Dec 22, 2016
02095af
added a history view and a gameList collection
BJHunnicutt Dec 22, 2016
4d6846d
added a history view and a game list collection
BJHunnicutt Dec 23, 2016
2b41091
set up github pages deploy
BJHunnicutt May 18, 2017
bc6687c
remove Charles branch reference
BJHunnicutt May 18, 2017
cfd751c
fix webpack bundle link
BJHunnicutt May 18, 2017
fa776b4
fix p5 links
BJHunnicutt May 19, 2017
4c92c43
fix css links
BJHunnicutt May 19, 2017
407ccb6
fix css links
BJHunnicutt May 19, 2017
88564c4
fix css links
BJHunnicutt May 19, 2017
a296749
fix css links
BJHunnicutt May 19, 2017
c7c75b2
Made clear default game and removed history
BJHunnicutt May 19, 2017
a962883
Made new players update correctly
BJHunnicutt May 19, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/build/app.bundle.js*

# From https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
Expand Down
Binary file added build/assets/aged_boards.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/aged_boards2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions build/assets/blue-whale.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/boards_leaf.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/colorspots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 190 additions & 0 deletions build/assets/earth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
163 changes: 163 additions & 0 deletions build/assets/jupiter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/mercury.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/narwhal.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/old-wood-board-texture.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/planed_wood.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/rocket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/rocket2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/turtle.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/yellowspots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/yellowspots2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
121 changes: 120 additions & 1 deletion build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,127 @@
<head>
<title>Tic-Tac-Toe</title>
<meta charset="utf-8">
<!-- Foundation Mobile responsive tags -->
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Foundation Mobile responsive tags -->

<link rel="stylesheet" href="./styles/foundation.css">
<link rel="stylesheet" href="./styles/app.css">
<!-- <link rel="stylesheet" href="/styles/stars.css"> -->

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Walter+Turncoat">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Work+Sans:100,200,300,400,500,600">
</head>
<body>
<script src="/app.bundle.js" charset="utf-8"></script>
<!-- <canvas id="canvas"> -->
<section id="bg-overlay"></section>
<section id="bg-image"></section>
<!-- <div class="stars"></div>
<div class="twinkling"></div>
<div class="clouds"></div> -->

<header>
<h1> T <br> I <br> C <br> - <br> T <br> A <br> C <br> - <br> T <br> O <br> E <br> </h1>
</header>

<main>
<div class="row">
<div id="game" class="large-8 medium-12 small-12 columns">

<div class="row">
<ul id="symbol-cards" class="row align-center">
<!-- insert "tmpl-symbol-card" template here -->
</ul>
</div>
<div id="scores" class="row">
<div id="player1-details" class="player-details large-4 medium-4 small-4 columns">
<!-- <h3> Jeannie </h3><h3> 2 </h3> -->
</div>
<div id="tie-details" class="large-4 medium-4 small-4 columns">
<!-- <h3> Tie </h3><h3> 1 </h3> -->
</div>
<div id="player2-details" class="large-4 medium-4 small-4 columns">
<!-- <h3> Lauren </h3><h3> 3 </h3> -->
</div>
</div>
<section id="contact-details"></section>
</div>

<div class=" large-4 medium-12 small-12 columns ">
<section class="row new-game-form">
<h4> New Matchup! </h4>
<div class="columns">
<label>
<h5>Player 1</h5>
<input type="text" name="player1">
</label>
<label>
<h5>Player 2</h5>
<input type="text" name="player2">
</label>
<h3 class="button btn-newgame"> New Matchup </h3>
<h3 class="button btn-cancel"> Start Over </h3>
<!-- <h4 class="button btn-continue"> Play Another game with same players </h4> -->
</div>
</section>
</div>

<!-- <div id="play-history" class="large-4 medium-12 small-12 columns ">
<h4 class="large-12 columns"> Top Players </h4>
<section class="row align-center">

<div id="game-history" class="columns">
<div class='player-hist-card button large-3 medium-3 small-4 columns'>
</div>
</div>

</section>
</div> -->

</div>

</div>


<h2 class="button" id="background-toggle"> :( </h2>

<div id="background-cover">
<section id="game-over-modal"></section>
</div>
</main>

<!-- Underscore Templates -->
<script type="text/template" id="tmpl-symbol-card">
<!-- Moved the tag and class specification for this template to the squareView.js with tagName and className -->
<!-- <li class="symbol-card large-4 medium-4 small-4 columns"> -->
<h4><%- contents %></h4>
<!-- </li> -->
</script>

<script type="text/template" id="tmpl-player-hist-card">
<h4><%- name %></h4>
</script>

<script type="text/template" id="tmpl-player-details">
<h4><%- name %> <%- symbol %></h4>
<h2><%- wins %></h2>
</script>

<script type="text/template" id="tmpl-end-game">
<h3><%- message %></h3>
<h2 class="button btn-continue"> Play Again! </h2>
</script>
<!-- Underscore Templates -->


<!-- Entire JS project built by Webpack -->
<script src="app.bundle.js" charset="utf-8"></script>

<!-- Loading the p5 library and the background interactive -->
<script src="./scripts/p5-source/p5.min.js"></script>
<script type='text/javascript' src='./scripts/p5-source/p5.dom.min.js'></script>
<script src="./scripts/background.js"></script>
<!-- </canvas> -->
</body>
</html>
55 changes: 55 additions & 0 deletions build/scripts/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

// $(document).ready(function() {


function setup() {
var canvas = createCanvas(windowWidth, windowHeight);
canvas.parent('bg-image');
canvas.id("spots");

// this resets the canvas if someone changes the window size, or else it stays a weird box
// **** You lose all old spots ****
window.onresize = function() {
canvas.size(window.innerWidth, window.innerHeight);
};

// if (canvas.style("visibility", "visible")) {
// canvas.id("spots");
// }

// if (canvas.style("visibility", "visible")) {
// canvas.size(window.innerWidth, window.innerHeight);
// }
}

var x;
var r = 255;
var g = 215;
var b = 0;
var timer;

function draw() {
// fill(255, 10); // semi-transparent white rectange for fade! https://amnonp5.wordpress.com/2012/01/28/25-life-saving-tips-for-processing/
// rect(0, 0, width, height);

fill(r, g, b);
strokeWeight(0);
ellipse(mouseX, mouseY, 80, 80);
this.lifespan--;
// triangle(mouseX+200, mouseY+150, mouseX+250, mouseY+25, mouseX+310, mouseY+150);
}
function mouseMoved() {
r = random(200, 255);
g = random(175, 255);
b = random(0, 0);
// draw();
// fill(r, g, b);
}

function mousePressed() {

var toggle1 = select("#background-toggle");
toggle1.mousePressed(setup);
}

// }); // closing $(document).ready
60 changes: 60 additions & 0 deletions build/scripts/bubbles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

jQuery(document).ready(function($){

var windowXArray = [],
windowYArray = [];

for (var i = 0; i < $(window).innerWidth(); i++) {
windowXArray.push(i);
}

for (var i = 0; i < $(window).innerHeight(); i++) {
windowYArray.push(i);
}

function randomPlacement(array) {
var placement = array[Math.floor(Math.random()*array.length)];
return placement;
}


var canvas = oCanvas.create({
canvas: '#canvas',
background: '#2c3e50',
fps: 60
});

setInterval(function(){

var rectangle = canvas.display.ellipse({
x: randomPlacement(windowXArray),
y: randomPlacement(windowYArray),
origin: { x: 'center', y: 'center' },
radius: 0,
fill: '#27ae60',
opacity: 1
});

canvas.addChild(rectangle);

rectangle.animate({
radius: 10,
opacity: 0
}, {
duration: '1000',
easing: 'linear',
callback: function () {
this.remove();
}
});

}, 100);

$(window).resize(function(){
canvas.width = $(window).innerWidth();
canvas.height = $(window).innerHeight();
});

$(window).resize();

});
1 change: 1 addition & 0 deletions build/scripts/p5-source/p5.dom.min.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions build/scripts/p5-source/p5.min.js

Large diffs are not rendered by default.

Loading