From 604de5f28d713d838d19392bb819f1d5a5b65a51 Mon Sep 17 00:00:00 2001 From: Jeysen Date: Sun, 3 Dec 2023 19:23:58 -0700 Subject: [PATCH] added difficulty levels to settings --- src/.vscode/c_cpp_properties.json | 18 ++++++++++ src/.vscode/launch.json | 13 +++++++ src/.vscode/settings.json | 59 +++++++++++++++++++++++++++++++ src/gamesettings.js | 20 +++++++++++ 4 files changed, 110 insertions(+) create mode 100644 src/.vscode/c_cpp_properties.json create mode 100644 src/.vscode/launch.json create mode 100644 src/.vscode/settings.json create mode 100644 src/gamesettings.js diff --git a/src/.vscode/c_cpp_properties.json b/src/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..980fd57 --- /dev/null +++ b/src/.vscode/c_cpp_properties.json @@ -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 +} \ No newline at end of file diff --git a/src/.vscode/launch.json b/src/.vscode/launch.json new file mode 100644 index 0000000..5e14c94 --- /dev/null +++ b/src/.vscode/launch.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json new file mode 100644 index 0000000..b9c6ac8 --- /dev/null +++ b/src/.vscode/settings.json @@ -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 +} \ No newline at end of file diff --git a/src/gamesettings.js b/src/gamesettings.js new file mode 100644 index 0000000..d1b26f0 --- /dev/null +++ b/src/gamesettings.js @@ -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 ""; + } +}