-
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.
- Loading branch information
Showing
18 changed files
with
920 additions
and
0 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,3 @@ | ||
# Visual Studio 2019 cache/options directory | ||
.vs/ | ||
High_Voltage_JS/.vs/ |
Empty file.
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,25 @@ | ||
|
||
import { cPlayer } from "./cPlayer.js"; | ||
import { cInterceptor } from "./cInterceptor.js"; | ||
|
||
const sOpenAreaSymbol = " "; | ||
const sPlayerSymbol = "*" ; | ||
const sDeadPlayerSymbol ="#" ; | ||
const sInterceptorSymbol = "+" ; | ||
const iNumberOfinterceptors = 15 ; | ||
const sHighVoltageSymbol = "x" ; | ||
const iMaxHighVoltageBarriersPerRow = 15 ; | ||
|
||
const iMazeRows = 25 ; | ||
const iMazeCols = 30 ; | ||
|
||
|
||
let nInterAlive; | ||
let nInterKilled; | ||
let nTotalinterceptorsKilled; | ||
let rMaze = new array(iMazeRows, iMazeCols); | ||
/*extern HANDLE hStdout; | ||
extern HANDLE hStdin; | ||
extern CONSOLE_SCREEN_BUFFER_INFO csbiInfo;*/ | ||
let cActivePlayer = new cPlayer; | ||
let interceptorCollection = new array(iNumberOfinterceptors) |
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,86 @@ | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
<Name>High_Voltage_JS</Name> | ||
<RootNamespace>High_Voltage_JS</RootNamespace> | ||
<SaveNodeJsSettingsInProjectFile>False</SaveNodeJsSettingsInProjectFile> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>6fbf47d6-2641-4d96-8439-a04a565e87e2</ProjectGuid> | ||
<ProjectHome>.</ProjectHome> | ||
<StartupFile> | ||
</StartupFile> | ||
<SearchPath> | ||
</SearchPath> | ||
<WorkingDirectory>.</WorkingDirectory> | ||
<OutputPath>.</OutputPath> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{349c5851-65df-11da-9384-00065b846f21};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids> | ||
<NodejsPort>1337</NodejsPort> | ||
<StartWebBrowser>True</StartWebBrowser> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Content Include="cInterceptor.js" /> | ||
<Content Include="cPlayer.js" /> | ||
<Content Include="GlobalVariables.js" /> | ||
<Content Include="high_voltage.js" /> | ||
<Content Include="index.html" /> | ||
<Content Include="mBuildMaze.js" /> | ||
<Content Include="mController.js" /> | ||
<Content Include="mFunctions.js" /> | ||
<Content Include="mMoveCharacters.js" /> | ||
<Content Include="mRunGame.js" /> | ||
<Content Include="package.json" /> | ||
<Content Include="README.md" /> | ||
<Content Include="high_voltage.css" /> | ||
</ItemGroup> | ||
<Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsToolsV2.targets" /> | ||
<ProjectExtensions> | ||
<VisualStudio> | ||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> | ||
<WebProjectProperties> | ||
<UseIIS>False</UseIIS> | ||
<AutoAssignPort>True</AutoAssignPort> | ||
<DevelopmentServerPort>0</DevelopmentServerPort> | ||
<DevelopmentServerVPath>/</DevelopmentServerVPath> | ||
<IISUrl>http://localhost:48022/</IISUrl> | ||
<NTLMAuthentication>False</NTLMAuthentication> | ||
<UseCustomServer>True</UseCustomServer> | ||
<CustomServerUrl>http://localhost:1337</CustomServerUrl> | ||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> | ||
</WebProjectProperties> | ||
</FlavorProperties> | ||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}" User=""> | ||
<WebProjectProperties> | ||
<StartPageUrl> | ||
</StartPageUrl> | ||
<StartAction>CurrentPage</StartAction> | ||
<AspNetDebugging>True</AspNetDebugging> | ||
<SilverlightDebugging>False</SilverlightDebugging> | ||
<NativeDebugging>False</NativeDebugging> | ||
<SQLDebugging>False</SQLDebugging> | ||
<ExternalProgram> | ||
</ExternalProgram> | ||
<StartExternalURL> | ||
</StartExternalURL> | ||
<StartCmdLineArguments> | ||
</StartCmdLineArguments> | ||
<StartWorkingDirectory> | ||
</StartWorkingDirectory> | ||
<EnableENC>False</EnableENC> | ||
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug> | ||
</WebProjectProperties> | ||
</FlavorProperties> | ||
</VisualStudio> | ||
</ProjectExtensions> | ||
</Project> |
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> | ||
</PropertyGroup> | ||
</Project> |
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,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.9.34723.18 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "High_Voltage_JS", "High_Voltage_JS.njsproj", "{6FBF47D6-2641-4D96-8439-A04A565E87E2}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{6FBF47D6-2641-4D96-8439-A04A565E87E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6FBF47D6-2641-4D96-8439-A04A565E87E2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6FBF47D6-2641-4D96-8439-A04A565E87E2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6FBF47D6-2641-4D96-8439-A04A565E87E2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {E81CAB94-EA7B-4C92-ADD7-5DBCAA24AAA2} | ||
EndGlobalSection | ||
EndGlobal |
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,3 @@ | ||
# High_Voltage_JS | ||
|
||
|
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,33 @@ | ||
|
||
class cInterceptor { | ||
//Private | ||
#m_bAlive = true; | ||
#m_iRow; | ||
#m_iColumn; | ||
|
||
//Public | ||
Alive() { | ||
return cInterceptor.#m_bAlive; | ||
} | ||
|
||
Alive(bNowAlive) { | ||
cInterceptor.#m_bAlive = bNowAlive; | ||
} | ||
|
||
Row() { | ||
return cInterceptor.#m_iRow; | ||
} | ||
|
||
Row(iNowRow) { | ||
cInterceptor.#m_iRow = iNowRow; | ||
} | ||
|
||
Column() { | ||
return cInterceptor.#m_iColumn; | ||
} | ||
|
||
Column(iNowCol) { | ||
cInterceptor.#m_iColumn = iNowCol; | ||
} | ||
|
||
} |
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 @@ | ||
class cPlayer { | ||
//Private: | ||
#m_bAlive = true; | ||
#m_iRow; | ||
#m_iColumn; | ||
|
||
//Public: | ||
Alive() { | ||
return cPlayer.#m_bAlive; | ||
} | ||
|
||
Alive(bNowAlive) { | ||
cPlayer.#m_bAlive = bNowAlive; | ||
} | ||
|
||
Row() { | ||
return cPlayer.#m_iRow; | ||
} | ||
|
||
Row(iNowRow) { | ||
cPlayer.#m_iRow = iNowRow; | ||
} | ||
|
||
Column() { | ||
return cPlayer.#m_iColumn; | ||
} | ||
|
||
Column(iNowCol) { | ||
cPlayer.#m_iColumn = iNowCol; | ||
} | ||
} |
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 @@ | ||
body { | ||
background-color: black; | ||
color: rgba(255, 255, 255, 0.8); | ||
} | ||
|
||
|
||
.maze-container { | ||
display: grid; | ||
grid-template-columns: auto auto auto; | ||
background-color: #2196F3; | ||
padding: 10px; | ||
} | ||
|
||
.cell-item { | ||
background-color: rgba(255, 255, 255, 0.8); | ||
border: 1px solid rgba(0, 0, 0, 0.8); | ||
padding: 2px; | ||
color: #000; | ||
font-size: 12px; | ||
text-align: center; | ||
font-family: Courier New,Courier,Lucida Sans Typewriter,Lucida Typewriter,monospace; | ||
} | ||
|
||
#content { | ||
background: #000; | ||
clear: both; | ||
font-size: 11px; | ||
color: #000; | ||
padding: 10px; | ||
font-family: Courier New,Courier,Lucida Sans Typewriter,Lucida Typewriter,monospace; | ||
} |
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,14 @@ | ||
// High_Voltage : Defines the entry point for the application. | ||
// | ||
import { RunGame } from "./mRunGame.js"; | ||
//import { hStdin, hStdout } from "./GlobalVariables.js"; | ||
|
||
function main() | ||
{ | ||
//hStdin = GetStdHandle(STD_INPUT_HANDLE); | ||
//hStdout = GetStdHandle(STD_OUTPUT_HANDLE); | ||
|
||
RunGame(); | ||
|
||
return 0; | ||
} |
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,55 @@ | ||
<!doctype html> | ||
<!-- saved from url=(0016)http://localhost --> | ||
<html> | ||
|
||
<head> | ||
<title>High Voltage</title> | ||
<!--CSS--> | ||
<link rel="stylesheet" type="text/css" href="high_voltage.css" /> | ||
<!--JavaScript Files--> | ||
<script type="text/javascript" src="high_voltage.js"></script> | ||
</head> | ||
|
||
<body> | ||
<h1 style="text-align:center"> | ||
*============*<br> | ||
| High Voltage!!! |<br> | ||
*============*<br> | ||
</h1> | ||
<br> | ||
<p> | ||
You are within the walls of a high voltage maze. | ||
There are 15 security machines (interceptors) | ||
trying to destroy you. | ||
</p> | ||
<p> | ||
You are the '*', and the interceptors are the '+'. | ||
The areas marked 'x' are high voltage! | ||
Your only hope is to destroy the interceptors by | ||
running them into an 'x'. | ||
Your moves are as follows: | ||
</p> | ||
<p> | ||
7.8.9 ^<br> | ||
4. .6 < + ><br> | ||
1.2.3 v<br> | ||
</p> | ||
<p> | ||
5 = No move for one turn.<br> | ||
10 = No move for the rest of the game.<br> | ||
-1 = Give up. Situation hopeless.<br> | ||
and of course '0' is super jump.<br> | ||
</p> | ||
<div class="maze-container"> | ||
<div class="cell-item">1</div> | ||
<div class="cell-item">2</div> | ||
<div class="cell-item">3</div> | ||
<div class="cell-item">4</div> | ||
<div class="cell-item">5</div> | ||
<div class="cell-item">6</div> | ||
<div class="cell-item">7</div> | ||
</div> | ||
|
||
</body> | ||
|
||
</html> |
Oops, something went wrong.