Skip to content

Commit 3727226

Browse files
first commit
0 parents  commit 3727226

File tree

9 files changed

+7400
-0
lines changed

9 files changed

+7400
-0
lines changed

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.php]
13+
tab_width = 4
14+
indent_size = 4
15+
indent_style = tab
16+
17+
[**.{min.js,min.css}]
18+
indent_style = ignore
19+
insert_final_newline = ignore
20+
21+
[*.{md,env,env.*,nvmrc,npmrc,prettierignore}]
22+
insert_final_newline = false
23+
trim_trailing_whitespace = false
24+
25+
[*.{md,json}]
26+
insert_final_newline = false

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
3+
# Local Netlify folder
4+
.netlify

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Tic Tac Toe
2+

netlify.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[build]
2+
base = "./"
3+
publish = "./tic-tac-toe"
4+
command = "echo 'hello netlify'"

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "tic-tac-toe",
3+
"version": "0.1.0",
4+
"description": "Tic Tac Toe - The Game",
5+
"author": "Fernando Moreira <[email protected]> (https://nandomoreira.dev/)",
6+
"license": "MIT",
7+
"main": "./tic-tac-toe/scripts.js",
8+
"keywords": [
9+
"game",
10+
"tic-tac-toe",
11+
"tic",
12+
"tac",
13+
"toe"
14+
],
15+
"scripts": {
16+
"dev": "browser-sync start --server ./tic-tac-toe --files ./tic-tac-toe",
17+
"deploy": "netlify deploy --dir=tic-tac-toe --prod",
18+
"test": "echo \"Error: no test specified\" && exit 1"
19+
},
20+
"devDependencies": {
21+
"browser-sync": "^2.26.7",
22+
"netlify-cli": "^2.31.0"
23+
}
24+
}

tic-tac-toe/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>Tic Tac Toe - The Game</title>
8+
<link rel="stylesheet" href="./styles.css">
9+
</head>
10+
<body>
11+
<h1>Tic Tac Toe - The Game</h1>
12+
<p>by <a href="http://nandomoreira.dev" target="_blank" rel="noopener noreferrer">nandomoreira.dev</a></p>
13+
14+
<script src="./scripts.js"></script>
15+
<script>TicTacToe.init();</script>
16+
</body>
17+
</html>

tic-tac-toe/scripts.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const TicTacToe = {
2+
winners: [
3+
[0,1,2],
4+
[3,4,5],
5+
[6,7,8],
6+
[0,3,6],
7+
[1,4,7],
8+
[2,5,8],
9+
[2,4,6]
10+
[0,4,8],
11+
],
12+
13+
startGame: function() {
14+
console.info('start the game!');
15+
},
16+
17+
endGame: function() {
18+
console.info('game over!');
19+
},
20+
21+
init: function() {
22+
this.startGame();
23+
this.endGame();
24+
},
25+
};

tic-tac-toe/styles.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
:root {
2+
box-sizing: border-box;
3+
font-family: sans-serif;
4+
font-size: 16px;
5+
}
6+
7+
body {
8+
background-color: #f9f8f8;
9+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
10+
font-size: 1rem;
11+
text-align: center;
12+
}
13+
14+
*,
15+
*::before,
16+
*::after {
17+
box-sizing: inherit;
18+
font-family: inherit;
19+
margin: 0;
20+
padding: 0;
21+
}

0 commit comments

Comments
 (0)