-
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 branch 'master' into rmcreyes/#78-format-scores
- Loading branch information
Showing
27 changed files
with
451 additions
and
46 deletions.
There are no files selected for viewing
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,142 @@ | ||
body { | ||
font-family: "VT323", monospace; | ||
background: #fff; | ||
} | ||
|
||
#root { | ||
height: 100%; | ||
} | ||
|
||
#app { | ||
height: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
text-align: center; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
#game-container { | ||
height: 667px; | ||
width: 350px; | ||
background: white; | ||
padding: 30px; | ||
} | ||
|
||
#player-stat-box { | ||
margin-top: 35px; | ||
height: 85px; | ||
} | ||
|
||
#gameplay-container { | ||
height: fit-content; | ||
margin: 31px; | ||
} | ||
|
||
#gameplay-content-box { | ||
height: 225px; | ||
width: 190px; | ||
display: inline-block; | ||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.33); | ||
} | ||
|
||
#user-interaction-box { | ||
margin-top: 26px; | ||
} | ||
|
||
#progress-bar { | ||
width: 50px; | ||
height: 15px; | ||
border-image-outset: 1; | ||
margin: 0; | ||
border-image-width: 1.5; | ||
} | ||
|
||
#landing-box { | ||
width: 190px; | ||
height: 200px; | ||
text-align: center; | ||
border: solid 2px; | ||
padding: 3px; | ||
display: inline-block; | ||
} | ||
|
||
#enter-name { | ||
text-decoration: underline; | ||
} | ||
|
||
.hide { | ||
display: none; | ||
} | ||
|
||
.nes-container { | ||
border-width: 2px; | ||
} | ||
|
||
.nes-container.is-rounded { | ||
border-image-width: 2; | ||
} | ||
|
||
.nes-btn { | ||
margin: 10px; | ||
padding: 3px 4px; | ||
} | ||
|
||
.row { | ||
display: block; | ||
} | ||
|
||
.column { | ||
width: 50%; | ||
} | ||
|
||
.width-50 { | ||
width: 50%; | ||
} | ||
|
||
.fit-content-width { | ||
width: fit-content; | ||
float: left; | ||
} | ||
|
||
.this-align-left { | ||
text-align: left; | ||
} | ||
|
||
.this-align-center { | ||
text-align: center; | ||
} | ||
|
||
.this-align-right { | ||
text-align: right; | ||
} | ||
|
||
.float-left { | ||
float: left; | ||
} | ||
|
||
.float-right { | ||
float: right; | ||
} | ||
|
||
.this-display-block { | ||
display: block; | ||
} | ||
|
||
.margin-right-10 { | ||
margin-right: 10px; | ||
} | ||
|
||
.stat { | ||
display: block; | ||
height: 20px; | ||
} | ||
|
||
.choice-btn-half { | ||
width: 35%; | ||
} | ||
|
||
.choice-btn-70 { | ||
width: 70%; | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,39 @@ | ||
import React from "react"; | ||
|
||
import placeholderImg from "../assets/place-holder-image.png"; | ||
import { GamePlayMode } from "../events/core"; | ||
|
||
interface IProps { | ||
mode: GamePlayMode; | ||
imgPath: string; | ||
} | ||
|
||
const generateAcceptanceLetter = () => { | ||
return ( | ||
<div | ||
id="gameplay-content-box" | ||
className="nes-container is-centered" | ||
> | ||
<p>Dear, <span id="enter-name" className="nes-pointer">Enter Name</span> | ||
</p> | ||
<p>Congratulations! <br />Please accept this offer of admission to UBC.</p> | ||
</div> | ||
); | ||
}; | ||
|
||
const generateComic = (img: string) => { | ||
return ( | ||
<img | ||
src={img === "" ? placeholderImg : img} | ||
alt="Gameplay comic" | ||
/> | ||
); | ||
}; | ||
|
||
export default function GamePlayConsole(props: IProps) { | ||
return ( | ||
<section id="gameplay-container" className={props.mode === GamePlayMode.Hide ? "hide" : ""}> | ||
{props.mode === GamePlayMode.AcceptanceLetter ? generateAcceptanceLetter() : generateComic(props.imgPath)} | ||
</section > | ||
); | ||
} |
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,19 +1,44 @@ | ||
import React from "react"; | ||
|
||
import Scores from "./Scores"; | ||
import NameIndicator from "./NameIndicator"; | ||
import TimeIndicator from "./TimeIndicator"; | ||
import PlayerStats from "./../trackers/PlayerStats"; | ||
|
||
interface IProps { | ||
playerStats: PlayerStats; | ||
week: number; | ||
name: string; | ||
} | ||
|
||
export default function Hud(props: IProps) { | ||
|
||
return ( | ||
<header> | ||
<Scores playerStats={props.playerStats}/> | ||
<TimeIndicator week={props.week}/> | ||
<header id="player-stat-box" className="row"> | ||
<div className="row"> | ||
<NameIndicator name={props.name} /> | ||
<TimeIndicator week={props.week} /> | ||
</div> | ||
<div className="row"> | ||
<span className="column this-align-left"> | ||
<span id="faculty-badge" className="fit-content-width margin-right-10 float-left"> | ||
<img className="nes-avatar is-large" src={props.playerStats.getLogo()} alt="Blank Faculty Logo" style={{imageRendering: "pixelated"}}/> | ||
</span> | ||
<span className="fit-content-width"> | ||
<Scores playerStats={props.playerStats}/> | ||
</span> | ||
</span> | ||
<span className="column"> | ||
{/* TODO: need to discuss how process should be defined */} | ||
{/* and make the progress bar meaningful. */} | ||
<progress | ||
id="progress-bar" | ||
className="nes-progress is-success float-right" | ||
value="5" | ||
max="10" | ||
/> | ||
</span> | ||
</div> | ||
</header> | ||
); | ||
} |
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,9 @@ | ||
import React from "react"; | ||
|
||
interface IProps { | ||
name: string; | ||
} | ||
|
||
export default function NameIndicator(props: IProps) { | ||
return <span id="name" className="this-align-left column float-left">Name: {props.name}</span>; | ||
} |
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
Oops, something went wrong.