Skip to content

Commit 0755263

Browse files
committed
thursday night draft
1 parent 6b178ef commit 0755263

21 files changed

+674
-195
lines changed

css/style.css

+202-28
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,15 @@ textarea {
419419
}
420420

421421
.container {
422-
padding: 0 30px;
422+
padding: 0 2px;
423+
position: relative;
423424
}
424425
.row {
425426
width: 100%;
426427
max-width: 1140px;
427428
min-width: 755px;
428429
margin: 0 auto;
429-
padding: 0.5em 0;
430+
padding: 0.25em 0;
430431
*zoom: 1;
431432
}
432433
.row:before,
@@ -557,14 +558,25 @@ textarea {
557558
.col-1:last-child {
558559
margin-right: 0;
559560
}
561+
* {
562+
margin: 0px;
563+
padding: 0px;
564+
}
560565
#board {
561566
width: 800px;
562-
height: 600px;
563-
background-color: green;
567+
height: 50px;
568+
position: relative;
569+
float: right;
570+
}
571+
body {
572+
background-image: url("../images/table2.jpg");
573+
display: inline;
564574
}
565575
#board > .container:nth-child(1) {
566-
border: 3px solid red;
567-
background-color: #1DA461;
576+
width: 708px;
577+
position: relative;
578+
margin: 0 auto;
579+
background-image: url("../images/pokerSurface.jpg.png");
568580
}
569581
.cards {
570582
width: 50px;
@@ -573,38 +585,31 @@ textarea {
573585
top: auto;
574586
left: auto;
575587
z-index: 10;
576-
border: 2px solid black;
588+
border: 1px solid black;
577589
}
578590
.circle {
579591
width: 50px;
580592
height: 70px;
581593
background: red;
582594
position: relative;
583595
z-index: 100;
584-
bottom: 76px;
585-
left: 2px;
586-
/*-moz-border-radius: 50px;
587-
-webkit-border-radius: 50px;
588-
border-radius: 15px;
589-
margin: auto;
590-
position: relative;
591-
z-index: 100;
592-
bottom: 50px;*/
596+
bottom: 75px;
597+
left: 1px;
593598
}
594599
.hand {
595600
width: 300px;
596601
height: 100px;
597-
background-color: brown;
598602
position: relative;
599-
left: 30%;
603+
left: 400px;
604+
top: 0px;
600605
}
601606
.col-2 {
602607
vertical-align: center;
603608
position: relative;
604609
top: 6px;
605610
margin: 8px;
606611
}
607-
.col-2 .cards {
612+
.cards {
608613
border: 1px solid black;
609614
}
610615
.col-1 {
@@ -618,14 +623,183 @@ textarea {
618623
height: 70px;
619624
position: relative;
620625
z-index: 100;
621-
bottom: 76px;
622-
left: 2px;
623-
/*height: 30px;
624-
-moz-border-radius: 50px;
625-
-webkit-border-radius: 50px;
626-
border-radius: 15px;
627-
margin: auto;
626+
bottom: 75px;
627+
left: 1px;
628+
}
629+
header {
630+
height: 120px;
631+
text-align: center;
632+
background-image: url("../images/pokerSurface.jpg.png");
633+
margin: 0;
634+
color: #A00000;
635+
font-size: 30px;
636+
font-family: 'Merriweather', serif;
637+
}
638+
header > .row {
639+
padding: 0;
640+
height: 120px;
628641
position: relative;
629-
z-index: 100;
630-
bottom: 50px;*/
642+
bottom: 10px;
643+
}
644+
#bull {
645+
position: relative;
646+
float: left;
647+
height: 400px;
648+
width: 300px;
649+
background-image: url("../images/bulletinBoard2.jpeg");
650+
left: 40px;
651+
top: 5px;
652+
display: block;
653+
}
654+
#bull > .row {
655+
min-width: 10px;
656+
width: 100px;
657+
}
658+
#bull > div:first-child {
659+
position: relative;
660+
top: 50px;
661+
left: 0px;
662+
height: 50px;
663+
width: 200px;
664+
background-image: url("../images/pokerSurface.jpg.png");
665+
color: #A00000;
666+
font-family: 'Merriweather', serif;
667+
font-size: 20px;
668+
padding: 0;
669+
}
670+
#bull > div:first-child .col-4 {
671+
width: 100px;
672+
padding: 0;
673+
}
674+
#bull > div:first-child button {
675+
height: 50px;
676+
width: 200px;
677+
position: relative;
678+
background-image: url("../images/pokerSurface.jpg.png");
679+
color: #A00000;
680+
}
681+
#bull > div:last-child {
682+
position: relative;
683+
top: 115px;
684+
left: 0px;
685+
height: 50px;
686+
width: 200px;
687+
background-image: url("../images/pokerSurface.jpg.png");
688+
font-family: 'Merriweather', serif;
689+
font-size: 20px;
690+
padding: 0;
691+
}
692+
#bull > div:last-child .col-4 {
693+
width: 100px;
694+
padding: 0;
695+
}
696+
#bull > div:last-child button {
697+
height: 50px;
698+
width: 200px;
699+
position: relative;
700+
background-image: url("../images/pokerSurface.jpg.png");
701+
color: #A00000;
702+
}
703+
.ruleList {
704+
position: absolute;
705+
height: 500px;
706+
width: 800px;
707+
text-align: center;
708+
left: 170px;
709+
top: 50px;
710+
background-color: #A00000;
711+
opacity: .98;
712+
border: 4px solid #333300;
713+
z-index: 300;
714+
color: #333300;
715+
}
716+
.ruleList h2 {
717+
font-size: 50px;
718+
font-family: 'Merriweather', serif;
719+
}
720+
.ruleList p {
721+
font-size: 20px;
722+
font-family: 'Merriweather', serif;
723+
text-align: left;
724+
padding: 5px 5px;
725+
margin: 0 10px;
726+
}
727+
.ruleList button {
728+
background-image: url("../images/pokerSurface.jpg.png");
729+
width: 200px;
730+
height: 50px;
731+
position: relative;
732+
top: 70px;
733+
font-size: 20px;
734+
font-family: 'Merriweather', serif;
735+
color: #A00000;
736+
}
737+
.computerWon {
738+
opacity: .98;
739+
position: absolute;
740+
height: 200px;
741+
width: 490px;
742+
z-index: 310;
743+
left: 500px;
744+
top: 250px;
745+
background-color: #A00000;
746+
display: block;
747+
border: 13px solid #CC9900;
748+
}
749+
.computerWon h1 {
750+
text-align: center;
751+
font-size: 60px;
752+
font-family: 'Merriweather', serif;
753+
}
754+
.playerWon {
755+
opacity: .98;
756+
position: absolute;
757+
height: 200px;
758+
width: 490px;
759+
z-index: 310;
760+
left: 500px;
761+
top: 250px;
762+
background-color: #A00000;
763+
display: block;
764+
border: 13px solid #CC9900;
765+
}
766+
.playerWon h1 {
767+
text-align: center;
768+
font-size: 60px;
769+
font-family: 'Merriweather', serif;
770+
}
771+
.tie {
772+
opacity: .98;
773+
position: absolute;
774+
height: 200px;
775+
width: 490px;
776+
z-index: 310;
777+
left: 500px;
778+
top: 250px;
779+
background-color: #A00000;
780+
display: block;
781+
border: 13px solid #CC9900;
782+
}
783+
.tie h1 {
784+
text-align: center;
785+
font-size: 60px;
786+
font-family: 'Merriweather', serif;
787+
}
788+
.winnerReset1 {
789+
font-size: 20px;
790+
font-family: 'Merriweather', serif;
791+
position: relative;
792+
left: 190px;
793+
}
794+
.winnerReset2 {
795+
font-size: 20px;
796+
font-family: 'Merriweather', serif;
797+
position: relative;
798+
left: 190px;
799+
}
800+
.winnerReset3 {
801+
font-size: 20px;
802+
font-family: 'Merriweather', serif;
803+
position: relative;
804+
left: 190px;
631805
}

images/GRASS.JPG

330 KB
Loading

images/backgroundtable.jpg

70.3 KB
Loading

images/bulletinBoard1.jpg

3.83 MB
Loading

images/bulletinBoard2.jpeg

11.6 KB
Loading

images/buttonBackground.png

41.7 KB
Loading

images/chipHolder.jpg

2.74 KB
Loading

images/pokerSurface.jpg.png

227 KB
Loading

images/table2.jpg

14.2 KB
Loading

index.html

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Make a Square</title>
5+
<link href='https://fonts.googleapis.com/css?family=Merriweather' rel='stylesheet' type='text/css'>
56
<link rel="stylesheet" type="text/css" href="css/style.css">
67
</head>
78
<body>
@@ -10,18 +11,29 @@
1011
<div class="row">
1112
<div class="col-12">
1213
<h1 class="Title Page">
13-
Make a Square
14+
Make-a-Square
1415
</h1>
1516
</div>
1617
</div>
1718
</header>
1819

20+
<div class="container" id="bull">
21+
<div class="row"><div class="col-4"><button class="newGame">new game</button></div></div>
22+
<div class="row"><div class="col-4"><button class="rules">rules</button></div></div>
23+
24+
</div>
25+
1926
<div id="board"></div>
2027

2128

2229

2330
<script src="js/jquery.js"></script>
31+
<script src="js/shadowBox.js"></script>
32+
<script src="js/deckManager.js"></script>
33+
<script src="js/boardMaker.js"></script>
2434
<script src="js/checkForWin.js"></script>
35+
<script src="js/computerMove.js"></script>
36+
<script src="js/tie.js"></script>
2537
<script src="js/main.js"></script>
2638
</body>
2739
</html>

js/boardMaker.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// boardMaker
2+
3+
4+
//-----------make board using javascript-------------
5+
6+
// makes container in board
7+
$('#board').append('<div class="container"></div>');
8+
9+
//creates 10 divs for card placement on board
10+
var columns = '<div class="col-1"></div>' +
11+
'<div class="col-1"></div>' +
12+
'<div class="col-1"></div>' +
13+
'<div class="col-1"></div>' +
14+
'<div class="col-1"></div>' +
15+
'<div class="col-1"></div>' +
16+
'<div class="col-1"></div>' +
17+
'<div class="col-1"></div>' +
18+
'<div class="col-1"></div>' +
19+
'<div class="col-1"></div>';
20+
21+
// create 5 rows for inside board and container
22+
for (var i = 0; i < 5; i++) {
23+
$('#board .container').append('<div class="row"></div>');
24+
var rows = $('#board .container .row');
25+
}
26+
27+
28+
//create 10 columns in each row
29+
$.each(rows, function(ind, val) {
30+
$(val).append(columns);
31+
});
32+
33+
var col = $('.col-1');

js/checkForWin.js

+23-2
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,37 @@ function didWin(currentChips) {
3737
//nothing happens
3838
}
3939
if ((neg10 && neg11 && neg1) || (neg1 && pos9 && pos10) || (pos10 && pos11 && pos1) || (pos1 && neg9 && neg10)){
40-
return true;
41-
}
40+
if ((currentChips[i] === 0) || (currentChips[i] === 10) || (currentChips[i] === 20) || (currentChips[i] === 30) || (currentChips[i] === 40)) {
41+
if ((pos10 && pos11 && pos1) || (pos1 && neg9 && neg10)) {
42+
return true;
43+
44+
} else {
45+
46+
}
47+
} else if ((currentChips[i] === 9) || (currentChips[i] === 19) || (currentChips[i] === 29) || (currentChips[i] === 39) || (currentChips[i] === 49)) {
48+
if ((pos9 && pos10 && neg1) || (neg1 && neg11 && neg10)) {
49+
return true;
50+
} else {
51+
52+
}
53+
} else {
54+
return true;
55+
}
4256
}
57+
}
4358
}
4459
return false;
60+
4561
}
4662

4763

4864

65+
// var a = [39,29,30,40];
66+
67+
// var b = [41,40,31,30];
4968

69+
// console.log(didWin(a)+' should be false');
70+
// console.log(didWin(b)+' should be true');
5071

5172

5273

0 commit comments

Comments
 (0)