Remove non-essential website pages
This commit is contained in:
@@ -1,283 +0,0 @@
|
||||
@page "/resume/derek"
|
||||
|
||||
<div class="PopOutFrame">
|
||||
<div class="Content" style="height: 170px !important;">
|
||||
<div class="ImgFrame">
|
||||
<img class="Picture" src="/img/ResumeFace.jpg" />
|
||||
</div>
|
||||
<div class="NameFrame">
|
||||
<h1>Derek Holloway</h1>
|
||||
<h1>Owner and sole developer</h1>
|
||||
</div>
|
||||
<div class="ContactFrame">
|
||||
<h1>derek@mistox.net</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PopOutHr"></div>
|
||||
</div>
|
||||
|
||||
<div class="PopOutFrame">
|
||||
<div class="Content">
|
||||
<h1 style="margin: 0; margin-bottom: 5px;">Work Experience</h1>
|
||||
<!-- NAVWAR Assistant Contract Tech. Rep. -->
|
||||
<div class="capsule" @onmouseenter="()=>{ MouseEnter(1); }" @onmouseleave="()=>{ MouseLeave(1); }">
|
||||
<div class="Skills" style="height: calc(100% - 40px);">
|
||||
<div class="paddedcell">
|
||||
<h2 class="jobTitle">NAVWAR Assistant Contract Tech. Rep.</h2>
|
||||
<h3 class="jobSub">Redhorse corp. - San Diego, CA</h3>
|
||||
<h3 class="jobSub">888-445-8010</h3>
|
||||
<h3 class="jobSub">February 2022 - Today</h3>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="SkillsContent colored" style="height: calc(100% - 40px); @ContentStyle1">
|
||||
<div class="paddedcell">
|
||||
<ul>
|
||||
<li><span>The first line of support for end users</span></li>
|
||||
<li><span>Fix or escalate issues as required to the correct authority for resolution</span></li>
|
||||
<li><span>The ACTR performs routine office IT functions managing mechanical and printer supplies</span></li>
|
||||
<li><span>Assisting with connectivity to and troubleshooting networked systems and Video Teleconferences</span></li>
|
||||
<li><span>This includes setting up new accounts</span></li>
|
||||
<li><span>Managing users accesses</span></li>
|
||||
<li><span>Uses the building badging system to grant access to appropriate personnel Assist with transition to Office 365 and Navy Flank Speed as required.</span></li>
|
||||
<li><span>Leading role on Junior level tasks/projects</span></li>
|
||||
<li><span>Supports the customer performing moderately complex tasks on a routine basis.</span></li>
|
||||
<br />
|
||||
<li><span>Project manager for NAVWAR tech refresh</span></li>
|
||||
<li><span>Replacing 4010+ computers within a 1 year time-frame</span></li>
|
||||
<li><span>Manage warranties with HP Federal</span></li>
|
||||
<li><span>Coordinating orders and returns for old leased hardware</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- NMCI Field Service -->
|
||||
<div class="capsule" @onmouseenter="()=>{ MouseEnter(2); }" @onmouseleave="()=>{ MouseLeave(2); }">
|
||||
<div class="Skills" style="height: calc(100% - 40px);">
|
||||
<div class="paddedcell">
|
||||
<h2 class="jobTitle">NMCI Field Service Technitian</h2>
|
||||
<h3 class="jobSub">Super Systems Inc - San Diego, CA</h3>
|
||||
<h3 class="jobSub">757-399-3000 - info@supersystemsinc.com</h3>
|
||||
<h3 class="jobSub">June 2021 - Feburary 2022</h3>
|
||||
<br />
|
||||
<h3 class="jobSub">Ohm Systems, Inc - San Diego, CA</h3>
|
||||
<h3 class="jobSub">215-675-2766 - info@ohmsysinc.com</h3>
|
||||
<h3 class="jobSub">February 2021 - June 2021</h3>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="SkillsContent colored" style="height: calc(100% - 40px); @ContentStyle2">
|
||||
<div class="paddedcell">
|
||||
<ul>
|
||||
<li><span>Performed layer 1 network troubleshooting; windows netsh firewalls, 802.1x Authentication issues, and cable and port issues.</span></li>
|
||||
<li><span>Performed hardware troubleshooting and replacements; replacing laptop motherboards, displays, cpus, ram, and peripherals.</span></li>
|
||||
<li><span>Performed software troubleshooting using event viewer, task manager, and command prompt. By uninstalling and reinstalling or reconfiguring.</span></li>
|
||||
<li><span>Worked with network printers, voip's, and video telecommunication devices.</span></li>
|
||||
<li><span>Worked face to face with customers, managing my time between calls and work orders.</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- NMCI Help Desk -->
|
||||
<div class="capsule" @onmouseenter="()=>{ MouseEnter(3); }" @onmouseleave="()=>{ MouseLeave(3); }">
|
||||
<div class="Skills" style="height: calc(100% - 40px);">
|
||||
<div class="paddedcell">
|
||||
<h2 class="jobTitle">NMCI Help Desk Technitian</h2>
|
||||
<h3 class="jobSub">Apex Systems - Coronado, CA</h3>
|
||||
<h3 class="jobSub">619-757-1646</h3>
|
||||
<h3 class="jobSub">September 2019 - September 2020</h3>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="SkillsContent colored" style="height: calc(100% - 40px); @ContentStyle3">
|
||||
<div class="paddedcell">
|
||||
<ul>
|
||||
<li><span>Performed remote troubleshooting: windows cmd, winrs, rdc, winrs. Fixing software issues</span></li>
|
||||
<li><span>Performed administrative Tasks: create active directory accounts and verifying identity to unlock accounts.</span></li>
|
||||
<li><span>Walked users through diagnosing network issues over the phone or escalated issue to field services</span></li>
|
||||
<li><span>Fixed users email issues; server mappings, proxy email addresses, shared emails, and outlook related issues.</span></li>
|
||||
<li><span>Moved users profiles from one domain to another and moved users files along with it.</span></li>
|
||||
<li><span>Fixed account related issues; id to user mismatch and wrong display name.</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Warehouse Reciever -->
|
||||
<div class="capsule" @onmouseenter="()=>{ MouseEnter(4); }" @onmouseleave="()=>{ MouseLeave(4); }">
|
||||
<div class="Skills" style="height: calc(100% - 40px);">
|
||||
<div class="paddedcell">
|
||||
<h2 class="jobTitle">Warehouse receiver</h2>
|
||||
<h3 class="jobSub">Ababa Bolt - El Cajon, CA</h3>
|
||||
<h3 class="jobSub">619-440-1781</h3>
|
||||
<h3 class="jobSub">May 2019 - August 2019</h3>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="SkillsContent colored" style="height: calc(100% - 40px); @ContentStyle4">
|
||||
<div class="paddedcell">
|
||||
<ul>
|
||||
<li><span>Verified that all parts came in off the packing slip</span></li>
|
||||
<li><span>Rejected parts that were damaged and sent back to manufacturer</span></li>
|
||||
<li><span>Sort and add parts into the tracking system</span></li>
|
||||
<li><span>Put parts away in appropriate areas</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Warehouse packer -->
|
||||
<div class="capsule" @onmouseenter="()=>{ MouseEnter(5); }" @onmouseleave="()=>{ MouseLeave(5); }">
|
||||
<div class="Skills" style="height: calc(100% - 40px);">
|
||||
<div class="paddedcell">
|
||||
<h2 class="jobTitle">Warehouse packer</h2>
|
||||
<h3 class="jobSub">Ababa Bolt - El Cajon, CA</h3>
|
||||
<h3 class="jobSub">619-440-1781</h3>
|
||||
<h3 class="jobSub">October 2017 - September 2018</h3>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="SkillsContent colored" style="height: calc(100% - 40px); @ContentStyle5">
|
||||
<div class="paddedcell">
|
||||
<ul>
|
||||
<li><span>Find which parts need more stock on shelves</span></li>
|
||||
<li><span>Split out parts by count or weight</span></li>
|
||||
<li><span>Verified and marked appropriate compliance such as RoHS</span></li>
|
||||
<li><span>Operated forklifts and scissor lifts</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- California Army National Guard -->
|
||||
<div class="capsule" @onmouseenter="()=>{ MouseEnter(6); }" @onmouseleave="()=>{ MouseLeave(6); }">
|
||||
<div class="Skills" style="height: calc(100% - 40px);">
|
||||
<div class="paddedcell">
|
||||
<h2 class="jobTitle">Motor Vehicle Trasport Operator</h2>
|
||||
<h3 class="jobSub">California Army National Guard</h3>
|
||||
<h3 class="jobSub">760-607-8574</h3>
|
||||
<h3 class="jobSub">September 2018 - Today</h3>
|
||||
<h3 class="jobSub">Rank/Grade - Specialist / E-4</h3>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="SkillsContent colored" style="height: calc(100% - 40px); @ContentStyle6">
|
||||
<div class="paddedcell">
|
||||
<ul>
|
||||
<li><span>88M - Motor Transport Operator</span></li>
|
||||
<li><span>Neccesarry to hold secret clearence and keep all cyber security certifications up to date.</span></li>
|
||||
<li><span>June 2020 - Protected and defended the Los Alamitos police department and Six Flags Magic Mountain during the rios cause by BLM movement that caused rioting in the streets.</span></li>
|
||||
<li><span>September 2020 - Worked with Cal-Fire in Chico, CA and Alderpoint, CA to cut fire lines to prevent the spread of fires during the <a href="https://en.wikipedia.org/wiki/August_Complex_fire">August Fire Complex</a> fires.</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PopOutHr"></div>
|
||||
</div>
|
||||
|
||||
<div class="PopOutFrame" @onmouseenter="()=>{ MouseEnter(7); }" @onmouseleave="()=>{ MouseLeave(7); }">
|
||||
<div class="Content">
|
||||
<div class="Skills">
|
||||
<h1>Development</h1>
|
||||
<ul>
|
||||
<li class="LIPrime">C#</li>
|
||||
<li>Mono</li>
|
||||
<li>ASP.NET</li>
|
||||
<li>ASP Core</li>
|
||||
<li>Blazor Web Assembly</li>
|
||||
<li>Windows Forms Apps</li>
|
||||
<li class="LIPrime">C++</li>
|
||||
<li>Arm Embedded</li>
|
||||
<li>Raspberry Pi</li>
|
||||
<li class="LIPrime">Database</li>
|
||||
<li>MySql</li>
|
||||
<li>MsSql</li>
|
||||
<li>LINQ</li>
|
||||
<li class="LIPrime">Game Engines</li>
|
||||
<li>Godot</li>
|
||||
<li>Unity 3D</li>
|
||||
<li>Solar 2D</li>
|
||||
<li class="LIPrime">Web Development</li>
|
||||
<li>Front End</li>
|
||||
<li>Back End</li>
|
||||
<li>Interfaces</li>
|
||||
<li>Square Payment API</li>
|
||||
<li>Rest Clients</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="SkillsContent" style="@ContentStyle7">
|
||||
<div class="paddedcell textSection">
|
||||
<a href="https://github.com/reverseslayer/LUADNS-DDNS">LUADNS-DDNS : https://github.com/reverseslayer/LUADNS-DDNS</a><br />
|
||||
<span>This is a service that I made for </span><a href="http://luadns.com">luadns.com</a><span>. This allows free ddns by simply changing the dns name servers to luadns nameservers and running this program as a service. This was made for linux but shoud easily run on windows.</span><br /><br />
|
||||
</div>
|
||||
<div class="paddedcell textSection">
|
||||
<a href="https://github.com/reverseslayer/MistoxServer">Mistox-Server : https://github.com/reverseslayer/MistoxServer</a><br />
|
||||
<span>This is a </span><a href="https://en.wikipedia.org/wiki/UDP_hole_punching">UDP Hole Punched</a><span> server; that allows clients to direct connect over the wan without opening ports. It works by having a dedicated TCP server that routes the UDP connections directly to each client. Based on this </span><a href="img/IdeaMap.jpg">Idea map.</a>
|
||||
</div>
|
||||
<div class="paddedcell textSection">
|
||||
<a href="https://www.mistox.net">Mistox.net : https://mistox.net</a><br />
|
||||
<span>Mistox.net is all done by me. The DNS is hosted by <a href="https://domains.google.com">domains.google.com</a> and pushed through <a href="http://luadns.com">luadns.com</a> name server so that I can run LUA-DDNS a service I made to reach other places that behind ddns. The webservers are hosted by <a href="https://www.vultr.com/">vultr.com</a> and the entire stack is built on <a href="https://dotnet.microsoft.com/en-us/apps/aspnet">asp.net</a>. The payment services are run through <a href="https://stripe.com/">stripe-payments</a>. I built this as a side project but its slowly becoming more and more something that I would like to be able to share things that I make; paid or free.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PopOutHr" style="margin-bottom: 30px;"></div>
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
string ContentStyle1 = "";
|
||||
string ContentStyle2 = "";
|
||||
string ContentStyle3 = "";
|
||||
string ContentStyle4 = "";
|
||||
string ContentStyle5 = "";
|
||||
string ContentStyle6 = "";
|
||||
string ContentStyle7 = "";
|
||||
|
||||
void MouseEnter( int frameNumber ) {
|
||||
if (frameNumber == 1){
|
||||
ContentStyle1 = "right: 0px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 2){
|
||||
ContentStyle2 = "right: 0px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 3){
|
||||
ContentStyle3 = "right: 0px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 4){
|
||||
ContentStyle4 = "right: 0px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 5){
|
||||
ContentStyle5 = "right: 0px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 6){
|
||||
ContentStyle6 = "right: 0px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 7){
|
||||
ContentStyle7 = "right: 0px;";
|
||||
base.StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void MouseLeave( int frameNumber ){
|
||||
if (frameNumber == 1){
|
||||
ContentStyle1 = "right: -700px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 2){
|
||||
ContentStyle2 = "right: -700px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 3){
|
||||
ContentStyle3 = "right: -700px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 4){
|
||||
ContentStyle4 = "right: -700px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 5){
|
||||
ContentStyle5 = "right: -700px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 6){
|
||||
ContentStyle6 = "right: -700px;";
|
||||
base.StateHasChanged();
|
||||
}else if (frameNumber == 7){
|
||||
ContentStyle7 = "right: -700px;";
|
||||
base.StateHasChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,191 +0,0 @@
|
||||
* {
|
||||
--popout-shadow-color-left: #8c8c8c;
|
||||
--popout-shadow-color-bottom: #595959;
|
||||
--popout-background-color: #004262;
|
||||
--frame-background-color: #005662;
|
||||
--frame-title-color: #ffffff;
|
||||
--job-title-color: #f35100;
|
||||
--job-sub-color: #c85c00;
|
||||
--text-color: #dddddd;
|
||||
--link-color: #4cff00;
|
||||
--link-visited-color: #73ac5b;
|
||||
--skills-bg-color: #c85c00;
|
||||
--skills-text-color: #000;
|
||||
--skills-text-shadow-color: #f35100;
|
||||
--skills-prime-background-color: #972500;
|
||||
--skills-prime-text-color: #fff;
|
||||
}
|
||||
|
||||
body {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: var(--frame-title-color);
|
||||
}
|
||||
|
||||
span {
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.PopOutFrame {
|
||||
position: relative;
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
max-width: 1080px;
|
||||
margin: 15px auto 0 auto;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.PopOutFrame::before {
|
||||
position: absolute;
|
||||
width: 6px;
|
||||
left: -6px;
|
||||
margin-top: 6px;
|
||||
background: var(--popout-shadow-color-left);
|
||||
content: "";
|
||||
display: block;
|
||||
transform: skew(0deg, -61deg);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.PopOutHr {
|
||||
width: 100%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.PopOutHr::after {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
margin-top: 0px;
|
||||
bottom: -11px;
|
||||
left: -3px;
|
||||
background: var(--popout-shadow-color-bottom);
|
||||
content: "";
|
||||
display: block;
|
||||
transform: skew(-31deg, 0deg);
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
.Content{
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
overflow: hidden;
|
||||
background-color: var(--popout-background-color);
|
||||
}
|
||||
|
||||
.ImgFrame {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.Picture{
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
}
|
||||
|
||||
.NameFrame {
|
||||
float: left;
|
||||
width: calc(100% - 510px);
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.ContactFrame {
|
||||
float: left;
|
||||
width: 300px;
|
||||
height: 140px;
|
||||
}
|
||||
|
||||
.ContactFrame h1{
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.SkillsContent {
|
||||
position: relative;
|
||||
float: left;
|
||||
height: 100%;
|
||||
width: 60%;
|
||||
transition-duration: 2s;
|
||||
right: -700px;
|
||||
}
|
||||
|
||||
.SkillsContent :link {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
.SkillsContent :visited{
|
||||
color: var(--link-visited-color) !important;
|
||||
}
|
||||
|
||||
.paddedcell {
|
||||
padding: 10px 5px;
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.colored {
|
||||
background-color: var(--frame-background-color);
|
||||
}
|
||||
|
||||
.paddedcell br{
|
||||
display: block;
|
||||
margin: 10px 0;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.Skills {
|
||||
float: left;
|
||||
height: 100%;
|
||||
width: 40%;
|
||||
transition-duration: 2s;
|
||||
}
|
||||
|
||||
.Skills h1{
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.Skills ul{
|
||||
font-size: 14px;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.Skills li {
|
||||
float: left;
|
||||
padding: 4px 6px;
|
||||
margin: 0 4px 4px 0;
|
||||
background-color: var(--skills-bg-color);
|
||||
text-shadow: 0 1px 1px var(--skills-text-shadow-color);
|
||||
color: var(--skills-text-color);
|
||||
}
|
||||
|
||||
.LIPrime{
|
||||
text-shadow: none;
|
||||
background-color: var(--skills-prime-background-color) !important;
|
||||
color: var(--skills-prime-text-color) !important;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.capsule {
|
||||
margin-top: 15px;
|
||||
overflow: hidden;
|
||||
border: solid var(--frame-background-color);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.jobTitle {
|
||||
margin: 0;
|
||||
color: var(--job-title-color);
|
||||
}
|
||||
|
||||
.jobSub {
|
||||
margin: 0;
|
||||
color: var(--job-sub-color);
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.textSection {
|
||||
margin-top: 15px;
|
||||
background-color: var(--frame-background-color);
|
||||
border-radius: 5px;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<button type="button" class="collapsible" @onclick=OpenCollapseable>@Title</button>
|
||||
|
||||
<ul class="dropdown-content" style="display : @collapseStyle;">
|
||||
@if (Children != null){
|
||||
@foreach(var Cur in Children){
|
||||
<li>
|
||||
@if(Cur.Type == FileType.Directory) {
|
||||
<ExplorerChild Title=@Cur.Path Children=Cur.Children PartialPath=@(PartialPath+Cur.Path) ></ExplorerChild>
|
||||
} else {
|
||||
<button type="button" @onclick=@((e)=>{ Download(Cur.Path); })>@Cur.Path</button>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
|
||||
@code{
|
||||
[Parameter]
|
||||
public string Title{ get; set; } = "";
|
||||
[Parameter]
|
||||
public DirObj[]? Children{ get; set; }
|
||||
[Parameter]
|
||||
public string PartialPath{ get; set; } = "";
|
||||
|
||||
public string collapseStyle = "none";
|
||||
|
||||
void OpenCollapseable() {
|
||||
if (collapseStyle == "block") {
|
||||
collapseStyle = "none";
|
||||
} else {
|
||||
collapseStyle = "block";
|
||||
}
|
||||
}
|
||||
|
||||
void Download(string Path) {
|
||||
Nav.NavigateTo( "api/product/download?Product=" + PartialPath + Path, true );
|
||||
}
|
||||
}
|
||||
@@ -1,164 +0,0 @@
|
||||
@page "/snake"
|
||||
|
||||
<div @onkeydown="OnKeyDown" tabindex="0" style="background-color: #333;" >
|
||||
<h1 id="Score" style="width: 100%; text-align: center; color:#fff;">Score : 0</h1>
|
||||
<div id="BODY" style="position: relative; margin-bottom: 5px; margin-left: 50%; right: 300px; background-color: #666; width: 600px; height: 600px;">
|
||||
<!-- Game -->
|
||||
|
||||
@foreach(SnakePart part in SnakeParts ) {
|
||||
<div style="position: absolute; left: @part.getX(); top: @part.getY(); width: 10px; height: 10px; background-color: #111; border: 0; padding: 0; margin: 0;"></div>
|
||||
}
|
||||
<div style="position: absolute; left: @Collectable.getX(); top: @Collectable.getY(); width: 10px; height: 10px; background-color: #f00; border: 0; padding: 0; margin: 0;"></div>
|
||||
|
||||
<!-- End Game -->
|
||||
</div>
|
||||
<div id="PauseScreen"style="position: relative; display: none; width: 500px; margin-left: 50%; right: 250px;">
|
||||
<h2 style="text-align: center; color: #f00; ">Game Paused</h2>
|
||||
</div>
|
||||
<div style="margin: 0 40px; width: calc(100% - 80px); background-color: #777;">
|
||||
<h3 style="text-align: center; font-size: 25px; color: #0f0; padding: 0; margin: 0; border: 0;">LEADERBOARD</h3>
|
||||
</div>
|
||||
<hr style="margin: 0px; width:calc(100% - 82px);" />
|
||||
<div id="Scoreboard" style="margin: 0 40px; width: calc(100% - 80px); background-color: #777;"></div>
|
||||
<h3 style="position: absolute; right: 10px; bottom: 3px; color: #fff;">Designed by Derek in California</h3>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
struct SnakePart {
|
||||
public int X{ get; set; }
|
||||
public int Y{ get; set; }
|
||||
public int Hue{ get; set; }
|
||||
|
||||
public string getX() {
|
||||
return X * 10 + "px";
|
||||
}
|
||||
public string getY() {
|
||||
return Y * 10 + "px";
|
||||
}
|
||||
}
|
||||
enum Direction {
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right
|
||||
}
|
||||
|
||||
List<SnakePart> SnakeParts = new List<SnakePart>(){
|
||||
new SnakePart{ X = 5, Y = 10 }, // Tail
|
||||
new SnakePart{ X = 6, Y = 10 },
|
||||
new SnakePart{ X = 7, Y = 10 },
|
||||
new SnakePart{ X = 8, Y = 10 } // Head
|
||||
};
|
||||
int Score = 0;
|
||||
bool Paused = false;
|
||||
Direction SnakeDirection = Direction.Right;
|
||||
int FrameRate = 1000 / 10;
|
||||
int HueRate = 5;
|
||||
|
||||
SnakePart Collectable = new SnakePart{ X = 15, Y = 15 };
|
||||
|
||||
|
||||
void OnKeyDown(KeyboardEventArgs e) {
|
||||
Console.WriteLine(e.Key);
|
||||
if (e.Key.ToLower() == "w" ) {
|
||||
SnakeDirection = Direction.Up;
|
||||
}else if (e.Key.ToLower() == "a" ) {
|
||||
SnakeDirection = Direction.Left;
|
||||
}else if (e.Key.ToLower() == "s" ) {
|
||||
SnakeDirection = Direction.Down;
|
||||
}else if (e.Key.ToLower() == "d" ) {
|
||||
SnakeDirection = Direction.Right;
|
||||
}
|
||||
}
|
||||
|
||||
bool CheckSelfHit() {
|
||||
foreach(SnakePart cur in SnakeParts ) {
|
||||
if (SnakeParts[SnakeParts.Count-1].X == cur.X ) {
|
||||
if (SnakeParts[SnakeParts.Count-1].Y == cur.Y ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckBounds() {
|
||||
if (SnakeParts[SnakeParts.Count-1].X > 0 && SnakeParts[SnakeParts.Count-1].X < 50 ) {
|
||||
if (SnakeParts[SnakeParts.Count-1].Y > 0 && SnakeParts[SnakeParts.Count-1].Y < 50 ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CheckCollectibleHit() { // return true if hit
|
||||
if (SnakeParts[SnakeParts.Count-1].X == Collectable.X ) {
|
||||
if (SnakeParts[SnakeParts.Count-1].Y == Collectable.Y ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ResetCollectable() {
|
||||
Collectable.X = new Random().Next(1, 40);
|
||||
Collectable.Y = new Random().Next(1, 40);
|
||||
}
|
||||
|
||||
void Die() {
|
||||
|
||||
}
|
||||
|
||||
void Update() {
|
||||
// Get Next Position
|
||||
if( SnakeDirection == Direction.Up ) {
|
||||
SnakeParts.Add( new SnakePart {
|
||||
X = SnakeParts[SnakeParts.Count-1].X,
|
||||
Y = SnakeParts[SnakeParts.Count-1].Y - 1,
|
||||
Hue = SnakeParts[SnakeParts.Count-1].Hue + HueRate
|
||||
});
|
||||
}else if (SnakeDirection == Direction.Right ) {
|
||||
SnakeParts.Add( new SnakePart {
|
||||
X = SnakeParts[SnakeParts.Count-1].X + 1,
|
||||
Y = SnakeParts[SnakeParts.Count-1].Y,
|
||||
Hue = SnakeParts[SnakeParts.Count-1].Hue + HueRate
|
||||
});
|
||||
}else if (SnakeDirection == Direction.Down ) {
|
||||
SnakeParts.Add( new SnakePart {
|
||||
X = SnakeParts[SnakeParts.Count-1].X,
|
||||
Y = SnakeParts[SnakeParts.Count-1].Y + 1,
|
||||
Hue = SnakeParts[SnakeParts.Count-1].Hue + HueRate
|
||||
});
|
||||
}else if (SnakeDirection == Direction.Left ) {
|
||||
SnakeParts.Add( new SnakePart {
|
||||
X = SnakeParts[SnakeParts.Count-1].X - 1,
|
||||
Y = SnakeParts[SnakeParts.Count-1].Y,
|
||||
Hue = SnakeParts[SnakeParts.Count-1].Hue + HueRate
|
||||
});
|
||||
}
|
||||
if (CheckSelfHit() && CheckBounds() ) {
|
||||
if( CheckCollectibleHit() ) {
|
||||
Score += 1;
|
||||
ResetCollectable();
|
||||
} else {
|
||||
SnakeParts.RemoveAt( 0 );
|
||||
}
|
||||
} else {
|
||||
Die();
|
||||
}
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
protected override void OnInitialized() {
|
||||
ResetCollectable();
|
||||
var timer = new System.Threading.Timer((e) => {
|
||||
if (!Paused){
|
||||
Update();
|
||||
}
|
||||
}, null, 0, FrameRate );
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user