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

M. Johnson TTT #14

Open
wants to merge 77 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
56da6d3
started Player spec testing and first test
johnanmorris Dec 13, 2016
e5e4889
preliminary player specs
johnanmorris Dec 13, 2016
1f415f3
preliminary Board specs code
mjohnson3038 Dec 13, 2016
c33102f
sending the board.js
mjohnson3038 Dec 13, 2016
ce8fbc9
in progress game
johnanmorris Dec 13, 2016
9daac5a
Merge branch 'game'
johnanmorris Dec 13, 2016
37636e4
wrote specs and variables for initial game
johnanmorris Dec 13, 2016
4fbe08a
wrote tests and functions for validSquare and toggleTurn
johnanmorris Dec 13, 2016
939fcbf
working through logic of finding winner
mjohnson3038 Dec 14, 2016
f883bd7
hard coded horizontal winner
mjohnson3038 Dec 14, 2016
1d68ab1
robust tests for horizontal win
mjohnson3038 Dec 14, 2016
2c28a72
no winner to return properly
johnanmorris Dec 14, 2016
8c6f79c
Horizontal passing as expected, vertical test failing because not coded
mjohnson3038 Dec 14, 2016
11cb7bd
testing and code for vertical wins
johnanmorris Dec 14, 2016
f4639ca
diagonal win tests and code
johnanmorris Dec 14, 2016
bb13868
wrote tests for draw game
johnanmorris Dec 14, 2016
a5500a7
game play. WIP toggleTurn post valid play move
mjohnson3038 Dec 14, 2016
ab3a14f
toggleTurn was good but the beforeEach needed to be altered
mjohnson3038 Dec 14, 2016
d587b9d
cleaning up post game play
mjohnson3038 Dec 14, 2016
023888f
functionality for when a player has won
johnanmorris Dec 14, 2016
70fbc6c
First Error
mjohnson3038 Dec 14, 2016
d2250c5
WIP: refactoring play
johnanmorris Dec 14, 2016
e31be6e
refactored tests to create a new Game instance before every test
johnanmorris Dec 14, 2016
6acebd5
revert changes to game
johnanmorris Dec 14, 2016
0e626b3
reverts, pt2
johnanmorris Dec 14, 2016
89aa690
Adding Error messaging for checking coordinates of play square
mjohnson3038 Dec 14, 2016
d1c24c1
Merge branch 'master' into mbj/error-handling
mjohnson3038 Dec 14, 2016
22ef51b
Error handling for NON whole numbers
mjohnson3038 Dec 14, 2016
278098e
error handling for play completed
mjohnson3038 Dec 14, 2016
ce1a3b5
re-added test refactoring with beforeEach
johnanmorris Dec 14, 2016
567a2fc
currentPlayer function to determine the playing whose turn it is
mjohnson3038 Dec 14, 2016
7af8cbe
refeactored winner with playerByMark
mjohnson3038 Dec 14, 2016
5e5cb1e
Use currentPlayer to refactor play
mjohnson3038 Dec 15, 2016
d766c00
fixed logic of playerByMark error handling
mjohnson3038 Dec 15, 2016
245065b
Backbone files created; stubbed out HTML for index page
johnanmorris Dec 16, 2016
62c9248
event framework for BoardView
mjohnson3038 Dec 16, 2016
2679894
Add applicationView events and fix file mixup
mjohnson3038 Dec 16, 2016
dd8216b
added custom events to views
mjohnson3038 Dec 16, 2016
1127346
basic CSS layout
johnanmorris Dec 16, 2016
ad47fe0
Merge branch 'master' of https://github.com/mjohnson3038/tic-tac-toe
mjohnson3038 Dec 16, 2016
1cb8534
Fixed compiling errors - small syntax error fixed
mjohnson3038 Dec 19, 2016
b071c9f
application model stubbed
johnanmorris Dec 19, 2016
044177e
resolved merge conflict in board_view
johnanmorris Dec 19, 2016
3d18200
console.log for clicking the board
johnanmorris Dec 19, 2016
1efd377
Console log the square id, but printing twice
mjohnson3038 Dec 19, 2016
378b0c4
Console log printing once, rendering once
mjohnson3038 Dec 19, 2016
ff1cc15
New Game logging -is an html tag not id
mjohnson3038 Dec 19, 2016
87ff12c
console.log for clearBoard functionality
johnanmorris Dec 19, 2016
9610744
modified styling
johnanmorris Dec 19, 2016
28b2c6f
added fonts
mjohnson3038 Dec 19, 2016
b39eac0
Foundation working, large - button right, small - button below
mjohnson3038 Dec 19, 2016
0f75e89
Not sure what went wrong or why it is working, but functionally as it…
mjohnson3038 Dec 19, 2016
341ec8f
adjusted foundation columns
johnanmorris Dec 19, 2016
4d7658e
Player turned to Backbone
mjohnson3038 Dec 19, 2016
6adc9cd
Board logic and specs to Backbone
mjohnson3038 Dec 19, 2016
ecc7e9a
Change name of model to game to match logic
mjohnson3038 Dec 19, 2016
9c7e356
WIP game logic and specs to model
mjohnson3038 Dec 19, 2016
997a4d3
figured out my first partial set of the grid
mjohnson3038 Dec 20, 2016
34a3d58
WIP play
mjohnson3038 Dec 20, 2016
07dccf3
No longer error with winner, still not passing though
mjohnson3038 Dec 20, 2016
26b9089
Work in progress, currentPlayer note being properly called
mjohnson3038 Dec 20, 2016
fd08180
Brute force and avoid built methods
mjohnson3038 Dec 20, 2016
6985fb8
Change to initialize grid over defualt, same tests failing
mjohnson3038 Dec 20, 2016
aca8653
undo hard code and use custom method
mjohnson3038 Dec 20, 2016
d6c4cb6
SOLVVVED THE ISSUE, was resetting the baord to all nulls with each play
mjohnson3038 Dec 20, 2016
f1e323b
FINALLY converted over to a Backbone Model
mjohnson3038 Dec 20, 2016
1a1a9d7
holy cow, stuff is printing in the board
mjohnson3038 Dec 21, 2016
37a3b60
Marking board and updates to model
mjohnson3038 Dec 21, 2016
ce6da32
new game button clears board successfully, new game isn't started yet
mjohnson3038 Dec 21, 2016
44c270c
board view and model working separately
mjohnson3038 Dec 21, 2016
26b6ab5
Game plays until winner & no rewritting squares, yay
mjohnson3038 Dec 22, 2016
9c12cb1
template to display winner
mjohnson3038 Dec 22, 2016
0b2d94c
Winner only displays once and disapears with new game
mjohnson3038 Dec 22, 2016
3c6b917
add section for current player toggle hide with wins
mjohnson3038 Dec 22, 2016
71c6822
Toggle between player turns, not displayed with initial load
mjohnson3038 Dec 22, 2016
a543072
Add html current player to initialize and working
mjohnson3038 Dec 22, 2016
c390834
Current player displayed for full game play
mjohnson3038 Dec 22, 2016
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
53 changes: 53 additions & 0 deletions build/css/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
html {
margin: 0 2.5em 0 2.5em;
}

h1 {
text-align: center;
}

#game {
margin: 0 auto 0 auto;
}

table {
margin: 0 auto 0 auto;
/*width: 30%;*/
text-align: center;
}

td {
border: 1px solid #000000;
background-color: white;
padding: 0px;
height: 2em;
width: 2em;
text-align: center;
font-size: 2em;
}

button, h1, td {
font-family: 'Chewy', cursive;
}

section #current-player {
border: 1px dashed black;
text-align: center;
font-size: 3em;
}

#sq-1, #sq-4, #sq-7 {
border-left: 0;
}

#sq-3, #sq-6, #sq-9 {
border-right: 0;
}

#sq-1, #sq-2, #sq-3 {
border-top: 0;
}

#sq-7, #sq-8, #sq-9 {
border-bottom: 0;
}
Loading