Skip to content

Commit

Permalink
added difficulty levels to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeysen34 committed Dec 4, 2023
1 parent c9b8254 commit 604de5f
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/.vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "macos-clang-arm64",
"includePath": [
"${workspaceFolder}/**"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "${default}",
"cppStandard": "${default}",
"intelliSenseMode": "macos-clang-arm64",
"compilerArgs": [
""
]
}
],
"version": 4
}
13 changes: 13 additions & 0 deletions src/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++ Runner: Debug Session",
"type": "lldb",
"request": "launch",
"args": [],
"cwd": "/Users/jeysenangous/Documents/Fall 2023/CS386/TheBubbleBots/src",
"program": "/Users/jeysenangous/Documents/Fall 2023/CS386/TheBubbleBots/src/build/Debug/outDebug"
}
]
}
59 changes: 59 additions & 0 deletions src/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"C_Cpp_Runner.cCompilerPath": "clang",
"C_Cpp_Runner.cppCompilerPath": "clang++",
"C_Cpp_Runner.debuggerPath": "lldb",
"C_Cpp_Runner.cStandard": "",
"C_Cpp_Runner.cppStandard": "",
"C_Cpp_Runner.msvcBatchPath": "",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wshadow",
"-Wformat=2",
"-Wcast-align",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference"
],
"C_Cpp_Runner.msvcWarnings": [
"/W4",
"/permissive-",
"/w14242",
"/w14287",
"/w14296",
"/w14311",
"/w14826",
"/w44062",
"/w44242",
"/w14905",
"/w14906",
"/w14263",
"/w44265",
"/w14928"
],
"C_Cpp_Runner.enableWarnings": true,
"C_Cpp_Runner.warningsAsError": false,
"C_Cpp_Runner.compilerArgs": [],
"C_Cpp_Runner.linkerArgs": [],
"C_Cpp_Runner.includePaths": [],
"C_Cpp_Runner.includeSearch": [
"*",
"**/*"
],
"C_Cpp_Runner.excludeSearch": [
"**/build",
"**/build/**",
"**/.*",
"**/.*/**",
"**/.vscode",
"**/.vscode/**"
],
"C_Cpp_Runner.useAddressSanitizer": false,
"C_Cpp_Runner.useUndefinedSanitizer": false,
"C_Cpp_Runner.useLeakSanitizer": false,
"C_Cpp_Runner.showCompilationTime": false,
"C_Cpp_Runner.useLinkTimeOptimization": false,
"C_Cpp_Runner.msvcSecureNoWarnings": false
}
20 changes: 20 additions & 0 deletions src/gamesettings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var slider = document.getElementById("difficultlevel");
var output = document.getElementById("demo");
output.innerHTML = getSliderValue(slider.value);

slider.oninput = function () {
output.innerHTML = getSliderValue(this.value);
};

function getSliderValue(value) {
switch (value) {
case "0":
return "EASY";
case "1":
return "MEDIUM";
case "2":
return "GRAND MASTER";
default:
return "";
}
}

0 comments on commit 604de5f

Please sign in to comment.