Skip to content

Commit

Permalink
Init win-condition branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-the-dev committed Mar 30, 2022
1 parent 87eac04 commit 0e33c6f
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 54 deletions.
25 changes: 16 additions & 9 deletions dist/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ body {
background-size: 400%;
margin: 0px;
background-position: center;
display: flex;
}

/* idea: animate 5s transition on turn flip */
Expand Down Expand Up @@ -47,15 +48,18 @@ body {
}
#container {
width: 100%;
height: 100%;
height: 100vh;
display: flex;
flex-direction: column;
}

#game {
width: 100%;
height: 100%;
/* width: 100%;
height: 100%; */
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 0.1fr 1fr 2fr 1fr 0.25fr;
/* justify-items: stretch; */
/* grid-auto-rows: minmax(100px, auto); */
/* flex-direction: column; */
}
Expand All @@ -77,8 +81,10 @@ header {
display: flex;
justify-content: center;
align-items: center;
grid-column: 2/4;
grid-column: 2/3;
grid-row: 3/4;
/* justify-items: stretch; */
justify-content: stretch;
}

#board {
Expand All @@ -94,7 +100,7 @@ header {
}

.opponent-row {
grid-column: 2/4;
grid-column: 2;
grid-row: 2/3;
display: flex;
align-items: center;
Expand All @@ -103,16 +109,16 @@ header {
}

.on-deck-row {
grid-column: 4;
grid-column: 3;
grid-row: 3/4;
display: flex;
align-items: center;
justify-content: left;
justify-items: start;
margin: 5px;
}

.player-row {
grid-column: 2/4;
grid-column: 2;
grid-row: 4;
display: flex;
align-items: flex-start;
Expand Down Expand Up @@ -373,6 +379,7 @@ font-family: 'Quicksand', sans-serif;
border-radius: 2px;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 2rem;
margin: 2px;
box-shadow: 0px 3px 18px 3px rgba(0, 0, 0, 0.2);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ <h1 class="title">Onitama</h1>

<div id="game">
<div class="menu-container">
<div class="menu-box"></div>
<div id="start" class="menu start-inactive">Start Game</div>
<div id="how-to-play" class="menu">How to Play</div>
<div id="all-move-cards" class="menu">Movement Cards (WIP)</div>
<div id="linkedin" class="menu">
<a href="https://www.linkedin.com/in/bill-camarco" target="_blank">LinkedIN</a>
<a href="https://www.linkedin.com/in/bill-camarco" target="_blank" class="link-tab">LinkedIN</a>
</div>
<div id="github" class="menu">
<a href="https://github.com/Bill-the-dev" target="_blank">GitHub</a>
<a href="https://github.com/Bill-the-dev" target="_blank" class="link-tab">GitHub</a>
</div>
</div>
<!--grid layout for overall page, fr -->
Expand Down
2 changes: 1 addition & 1 deletion notes_bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


*Turn transition background*
- Start button template works! Now to figure out turn tracking to call red/blue alternate
- Start button template works, alternate works. Too harsh when color transition starts.

*Turn transition card*
- Flip transluscent over to indicate blue/red turn. Above and below the onDeck.
Expand Down
25 changes: 0 additions & 25 deletions src/scripts/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,28 +354,3 @@ export default class Game {


// consider adding a KEY:value list of variables like pawn, master, or player
// also where to keep card objects?



// function addGlobalEventListener(type, selector, callback) {
// document.addEventListener(type, e => {
// if (e.target.matches(selector)) callback(e);
// });
// }


// function createGrid() {
// const gameBoard = document.getElementById("board");

// for (let i = 0; i < 5; i++) {
// for (let j = 0; j < 5; j++) {
// let square = document.createElement("div");
// square.classList.add("square");
// square.setAttribute("id", [i, j]);
// // gameBoard.appendChild(square);
// }
// }
// }

// createGrid();
28 changes: 18 additions & 10 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ body {
background-size: 400%;
margin: 0px;
background-position: center;
display: flex;
}

/* idea: animate 5s transition on turn flip */
Expand Down Expand Up @@ -48,16 +49,20 @@ body {

#container {
width: 100%;
height: 100%;
height: 100vh;
display: flex;
flex-direction: column;
}


#game {
width: 100%;
height: 100%;
/* width: 100%;
height: 100%; */
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: .1fr 1fr 2fr 1fr .25fr;
grid-template-columns: repeat(auto-fit, 3, 1fr);
grid-template-rows: repeat(auto-fit, 1fr);
/* grid-template-rows: auto-fit, .1fr 1fr 2fr 1fr .25fr; */
/* justify-items: stretch; */
/* grid-auto-rows: minmax(100px, auto); */
/* flex-direction: column; */

Expand All @@ -81,8 +86,10 @@ header {
display: flex;
justify-content: center;
align-items: center;
grid-column: 2 / 4;
grid-column: 2 / 3;
grid-row: 3 / 4;
/* justify-items: stretch; */
justify-content: stretch;
}

#board {
Expand All @@ -93,11 +100,12 @@ header {
/* border: 2px solid black; */
border-radius: 6px;
box-shadow: 0px, 3px, 18px, rgba(0, 0, 0, 0.5);

}


.opponent-row {
grid-column: 2 / 4;
grid-column: 2;
grid-row: 2 / 3;
display: flex;
align-items: center;
Expand All @@ -107,16 +115,16 @@ header {
}

.on-deck-row {
grid-column: 4;
grid-column: 3;
grid-row: 3/4;
display:flex;
align-items: center;
justify-content: left;
justify-items: start;
margin: 5px;
}

.player-row{
grid-column: 2 / 4;
grid-column: 2;
grid-row: 4;
display: flex;
align-items: flex-start;
Expand Down
18 changes: 12 additions & 6 deletions src/styles/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,29 @@
justify-content: center;
align-items: center;
grid-column: 1 / 2;
grid-row: 3; /* not moving, why? */
/* position: relative; */
grid-row: 3;
border-radius: 2px;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 2rem;
margin:2px;
box-shadow: 0px 3px 18px 3px rgba(0, 0, 0, .2)
}

.menu {
/* border: 1px solid gray; */
border: 1px solid gray;
border-radius: 2px;
box-shadow: 0px 3px 18px 3px rgba(0, 0, 0, .2);
width: 95%;
align-self: flex-start;
margin-top: 10px;
text-align: center;
cursor: pointer;

}
cursor: pointer;
}

/* doesn't work... tried on div, id, a */
.link-tab {
text-decoration: none;
color: inherit;
}

0 comments on commit 0e33c6f

Please sign in to comment.