-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from t03jam8/boardsize
Boardsize
- Loading branch information
Showing
9 changed files
with
11,414 additions
and
2,231 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,160 @@ | ||
* { | ||
font-family: "Alegreya Sans"; | ||
} | ||
|
||
button { | ||
background-color: #fafafa; | ||
box-shadow: 0 0 0 0; | ||
} | ||
|
||
h1 { | ||
font-size: 50px; | ||
background-color: rgba(255, 255, 255, 0.75); | ||
border-bottom: solid; | ||
border-top: solid; | ||
border-width: thin; | ||
} | ||
|
||
.MaxWidth { | ||
max-width: 100vw; | ||
height: 100vh; | ||
margin: auto; | ||
/* background-color: #fafafa; */ | ||
background: radial-gradient( | ||
farthest-corner at 200px 40px, | ||
rgba(255, 255, 255, 0.6), | ||
rgba(155, 155, 155, 1) | ||
), | ||
url("https://i.pinimg.com/564x/dc/db/25/dcdb25898500b461badb22d17f3a1835.jpg"); | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: flex-start; | ||
align-items: center; | ||
} | ||
|
||
.Rook { | ||
width: 30px; | ||
height: 30px; | ||
border-radius: 50%; | ||
background-color: red; | ||
cursor: pointer; | ||
} | ||
.BoardSizeChoice { | ||
flex: 1; | ||
display: flex; | ||
justify-content: space-around; | ||
flex-direction: column; | ||
align-items: center; | ||
background-color: transparent; | ||
border-bottom: solid; | ||
border-width: thin; | ||
margin-right: 10px; | ||
margin-left: 10px; | ||
} | ||
#DarkSquare { | ||
background-color: black; | ||
} | ||
#LightSquare { | ||
background-color: white; | ||
} | ||
.CenteringContainer { | ||
height: 620px; | ||
width: 800px; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
.BoardPositions { | ||
height: 620px; | ||
width: 620px; | ||
border: solid; | ||
border-color: black; | ||
border-width: thin; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background: rgba(255, 255, 255, 0.75); | ||
} | ||
.UserOptions { | ||
height: 400px; | ||
width: 150px; | ||
display: flex; | ||
flex-direction: column; | ||
border: solid; | ||
border-width: thin; | ||
border-color: black; | ||
background: rgba(255, 255, 255, 0.75); | ||
} | ||
.Square:hover { | ||
filter: invert(20%); | ||
} | ||
.Title { | ||
flex: 0.33; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
.GameType { | ||
flex: 0.4; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
.Type { | ||
font-size: 15px; | ||
margin-left: 20px; | ||
} | ||
.CheckBox { | ||
margin-right: 20px; | ||
} | ||
.Color { | ||
background-color: orange; | ||
flex: 2; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.ColorChoice { | ||
flex: 1; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-left: 20px; | ||
margin-right: 20px; | ||
} | ||
#Blues { | ||
background-color: blue; | ||
} | ||
#Blacks { | ||
background-color: red; | ||
} | ||
#Reds { | ||
background-color: yellow; | ||
} | ||
#Oranges { | ||
background-color: green; | ||
} | ||
#Purples { | ||
background-color: purple; | ||
} | ||
.Controler { | ||
flex: 1; | ||
display: flex; | ||
justify-content: space-around; | ||
align-items: center; | ||
} | ||
.PreviousButtion { | ||
width: 0; | ||
height: 0; | ||
border-top: 15px solid transparent; | ||
border-bottom: 15px solid transparent; | ||
border-right: 15px solid black; | ||
} | ||
.SolutionNumber { | ||
font-size: 40px; | ||
} | ||
.NextButtion { | ||
width: 0; | ||
height: 0; | ||
border-top: 15px solid transparent; | ||
border-bottom: 15px solid transparent; | ||
border-left: 15px solid black; | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
exports.calc = n => { | ||
let rooks = 0; | ||
let j = 0; | ||
let solutions = 0; | ||
let col = Array(n).fill(0); | ||
const individualRes = [1, 2, 3, 4]; | ||
const allRes = []; | ||
|
||
function recur() { | ||
for (let i = 0; i < n; i++) { | ||
if (col[i] === 0) { | ||
col[i] = 1; | ||
individualRes[j] = i; | ||
rooks++; | ||
if (rooks === n) { | ||
allRes.push(individualRes.concat()); | ||
solutions++; | ||
} | ||
j++; | ||
recur(); | ||
col[i] = 0; | ||
j--; | ||
rooks--; | ||
} | ||
} | ||
} | ||
recur(); | ||
return allRes; | ||
}; | ||
|
||
// calc(3); |
Oops, something went wrong.