Last active
August 26, 2020 07:25
-
-
Save lyraddigital/ac6da069100e6fdbb080ae40ed7825af to your computer and use it in GitHub Desktop.
Tic Tac Toe YouTube video snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--background-light-color: #57ebd7; | |
--background-dark-color: #24a88b; | |
--content-background-color: #fff6be; | |
--primary-color: #007340; | |
--primary-brighter: #00a057; | |
--primary-saturated: #05a058; | |
--primary-saturated-brighter: #07cf72; | |
--accent-color: #FD0; | |
--accent-darker: #a79000; | |
--box-shadow-color: rgba(0,0,0,0.75); | |
--modal-overlay-color: rgba(0, 0, 0, 0.3); | |
--main-background-gradient: linear-gradient(to right, var(--background-light-color) 0%, var(--background-dark-color) 100%); | |
--primary-gradient: linear-gradient(to right, var(--primary-color) 0%,var(--primary-saturated) 100%); | |
--primary-highlight-gradient: linear-gradient(to right, var(--primary-brighter) 0%,var(--primary-saturated-brighter) 100%); | |
--box-shadow: 0 1vmin 2vmin -1vmin rgba(0,0,0,0.75); | |
--default-border-radius: 2vmin; | |
--default-primary-border: 0.25vmin solid var(--primary-color); | |
--default-accent-border: 0.25vmin solid var(--accent-darker); | |
--main-title-font-size: 4vmin; | |
--selection-animation-duration: 350ms; | |
} | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
html, body { | |
height: 100%; | |
} | |
body { | |
display: grid; | |
place-items: center center; | |
background: var(--main-background-gradient); | |
font-family: Arial, Helvetica, sans-serif; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<link rel="stylesheet" href="css/tic-tac-toe.css" /> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const winningMatrix = { | |
0: [[1,2],[3,6],[4,8]], | |
1: [[0,2],[4,7]], | |
2: [[0,1],[5,8],[4,6]], | |
3: [[0,6],[4,5]], | |
4: [[2,6],[3,5],[1,7],[0,8]], | |
5: [[3,4],[2,8]], | |
6: [[7,8],[0,3],[2,4]], | |
7: [[6,8],[1,4]], | |
8: [[6,7],[2,5],[0,4]] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment