Skip to content

Commit ead90c6

Browse files
author
ernestodebesto
committed
zadania
1 parent da939a2 commit ead90c6

File tree

7 files changed

+44
-21
lines changed

7 files changed

+44
-21
lines changed

.DS_Store

2 KB
Binary file not shown.

css/style.css

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ h1 {
2828
font-size: 50px;
2929
color: #18CAE6;
3030
margin-bottom: 5px;
31+
text-shadow: 2px 2px #ff0000;
3132
}
3233

34+
3335
h3 {
3436
color: #18CAE6;
3537
}
@@ -39,7 +41,7 @@ h3 span {
3941
font-size: 32px;
4042
}
4143

42-
#computer-points-counter {
44+
#points-human {
4345
color: #F0E28F;
4446
}
4547
.experimental-container {
@@ -51,8 +53,6 @@ h3 span {
5153
height:456px
5254
}
5355

54-
55-
5656
.restart-btn {
5757
width: 100px;
5858
height: 50px;
@@ -109,8 +109,6 @@ h3 span {
109109
text-align: center;
110110
}
111111

112-
113-
114112
.intro {
115113
width: 763px;
116114
height: 628px;

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE="
1010
crossorigin="anonymous"></script>
1111
<link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet">
12+
<link href="https://fonts.googleapis.com/css?family=Faster+One" rel="stylesheet">
1213
</head>
1314
<body>
1415
<div id="app"></div>

js/.DS_Store

0 Bytes
Binary file not shown.

js/out.js

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9811,12 +9811,6 @@ document.addEventListener('DOMContentLoaded', function () {
98119811
}
98129812
};
98139813

9814-
_this.firstRun = function () {
9815-
setTimeout(function () {
9816-
$('.intro').hide();
9817-
}, 2000);
9818-
};
9819-
98209814
_this.moveAI = function () {
98219815
if (_this.state.end) {
98229816
console.log('koniec gry');
@@ -10081,7 +10075,7 @@ document.addEventListener('DOMContentLoaded', function () {
1008110075
),
1008210076
_react2.default.createElement(
1008310077
'div',
10084-
{ className: 'points-ai', style: { backgroundImage: this.state.boardUrl } },
10078+
{ className: 'points-ai' },
1008510079
_react2.default.createElement(
1008610080
'h3',
1008710081
null,
@@ -10093,6 +10087,11 @@ document.addEventListener('DOMContentLoaded', function () {
1009310087
)
1009410088
)
1009510089
),
10090+
_react2.default.createElement(
10091+
'div',
10092+
null,
10093+
' helloo'
10094+
),
1009610095
_react2.default.createElement(
1009710096
'div',
1009810097
{ className: 'points-human' },
@@ -10102,7 +10101,7 @@ document.addEventListener('DOMContentLoaded', function () {
1010210101
'AI Points : ',
1010310102
_react2.default.createElement(
1010410103
'span',
10105-
{ id: 'computer-points-counter' },
10104+
{ id: 'points-human' },
1010610105
this.state.computerPoints
1010710106
)
1010810107
)
@@ -10148,11 +10147,25 @@ document.addEventListener('DOMContentLoaded', function () {
1014810147
)
1014910148
);
1015010149
}
10151-
// kiedy gracz zaczyna
1015210150

10151+
//zmien zasade ruszania sie. tylko po jednym state dla pozycji.
10152+
//metody do ai
10153+
//tak, zeby bylo ladnie
10154+
//podziel na moduly
10155+
//dodaj komponent - header - punkty
10156+
//usun jquert
10157+
//zmien humanpoints na computer points
10158+
10159+
// kiedy gracz zaczyna
1015310160

1015410161
// akcja dla wygranej
1015510162

10163+
10164+
//zdecyduj sie czy zostawic element intro zeby wiedzieli ze umiem propsy. a moze wyjebac intro i dac propsy headerowi
10165+
// firstRun = () => {
10166+
// setTimeout(() => {$('.intro').hide()}, 2000)
10167+
// }
10168+
1015610169
//tu bedzie caly ai
1015710170

1015810171

js/thumb2.jpg

82.1 KB
Loading

js/zadanie01.jsx

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ document.addEventListener('DOMContentLoaded', function() {
3333
<h1>Tic Tac Toe 9000</h1>
3434
</div>
3535
</div>
36-
<div className='points-ai' style={ {backgroundImage:this.state.boardUrl }}>
36+
<div className='points-ai'>
3737
<h3>User Points : <span>{this.state.humanPoints}</span>
3838
</h3>
3939
</div>
40+
<div> helloo</div>
4041
<div className='points-human'>
41-
<h3>AI Points : <span id='computer-points-counter'>{this.state.computerPoints}</span>
42+
<h3>AI Points : <span id='points-human'>{this.state.computerPoints}</span>
4243
</h3>
4344
</div>
4445
</div>
@@ -70,6 +71,16 @@ document.addEventListener('DOMContentLoaded', function() {
7071

7172
)
7273
}
74+
75+
76+
//zmien zasade ruszania sie. tylko po jednym state dla pozycji.
77+
//metody do ai
78+
//tak, zeby bylo ladnie
79+
//podziel na moduly
80+
//dodaj komponent - header - punkty
81+
//usun jquert
82+
//zmien humanpoints na computer points
83+
7384
// kiedy gracz zaczyna
7485
makeMove = (e) => {
7586
if (e.currentTarget.className === 'y field' || e.currentTarget.className === 'x field' || this.state.end) {
@@ -89,7 +100,6 @@ document.addEventListener('DOMContentLoaded', function() {
89100
setTimeout(this.moveAI, 200)
90101
}
91102
}
92-
93103
// akcja dla wygranej
94104
endGame = (winner) => {
95105
$('.experimental-container').css('background-image', 'url(./img/koniecgry.gif?' + Math.random()+')')
@@ -103,9 +113,11 @@ document.addEventListener('DOMContentLoaded', function() {
103113
}
104114

105115

106-
firstRun = () => {
107-
setTimeout(() => {$('.intro').hide()}, 2000)
108-
}
116+
//zdecyduj sie czy zostawic element intro zeby wiedzieli ze umiem propsy. a moze wyjebac intro i dac propsy headerowi
117+
// firstRun = () => {
118+
// setTimeout(() => {$('.intro').hide()}, 2000)
119+
// }
120+
109121
//tu bedzie caly ai
110122
moveAI = () => {
111123
if (this.state.end) {
@@ -114,7 +126,6 @@ document.addEventListener('DOMContentLoaded', function() {
114126
setTimeout(this.checkWinAI, 200)
115127
}
116128
}
117-
118129
stopAndReset = () => {
119130
$('.experimental-container').css('background-image', 'url(./img/poczatek.gif?'+ Math.random() +')')
120131
this.setState({

0 commit comments

Comments
 (0)