-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from AviationSFO/development
Development
- Loading branch information
Showing
9 changed files
with
53 additions
and
188 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
#include <iostream> | ||
|
||
using namespace std; | ||
|
||
int main() | ||
{ | ||
system("python turtlesnake.py"); | ||
return 0; | ||
} |
Binary file not shown.
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,10 +1 @@ | ||
{ | ||
"highscore": 0, | ||
"bgcolor": "dark green", | ||
"foodcolor": "navy", | ||
"foodshape": "square", | ||
"foodnum": 2, | ||
"mutesound": true, | ||
"headcolor": "white", | ||
"tailcolor": "blue" | ||
} | ||
{"highscore": 0, "bgcolor": "dark green", "foodcolor": "dark red", "foodshape": "circle", "foodnum": 2, "mutesound": true, "headcolor": "white", "tailcolor": "#13325e"} |
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,62 +1,41 @@ | ||
#Turtle Snake Game color and shape congigurator for 1.10.1 and newer on 2-8-2022 By Steven Weinstein | ||
import json | ||
#Turtle Snake Game color and shape congigurator for 2.0.0 and newer on 8-8-2022 By Steven Weinstein | ||
|
||
|
||
def config(): | ||
import os | ||
def config(script_path): | ||
import json | ||
prefs = { | ||
"highscore": 0, | ||
"bgcolor": "dark green", | ||
"foodcolor": "navy", | ||
"foodshape": "square", | ||
"foodnum": 2, | ||
"mutesound": True | ||
} | ||
prefs = {"highscore": 0, "bgcolor": "dark green", "foodcolor": "dark red", "foodshape": "circle", "foodnum": 2, "mutesound": True, "headcolor": "white", "tailcolor": "#13325e"} | ||
print('''Color Configurator | ||
enter a hex code or an accepted color name from this list: https://trinket.io/docs/colors NO RGB VALUES''') | ||
prefs["bgcolor"] = input("What color would you like the background: ") | ||
prefs["foodcolor"] = input("What color would you like the food: ") | ||
prefs["foodshape"] = input("Food shape: circle square triange or turtle: ") | ||
prefs["foodnum"] = input("Would you like to have 1 or 2 foods: ") | ||
with open(os.path.expanduser( | ||
"~/Desktop/SnakeGame/prefs.json"), "w") as write_file: | ||
with open(script_path.joinpath("prefs.json"), "w") as write_file: | ||
json.dump(prefs, write_file) | ||
# writing to text document | ||
print("Succesfuly configured!\nYou will have to restart the game for changes to take effect.") | ||
global changedcolor | ||
changedcolor = True | ||
return | ||
|
||
def snakecolor(): | ||
import os | ||
def snakecolor(script_path): | ||
import json | ||
prefs = { | ||
"highscore": 0, | ||
"bgcolor": "dark green", | ||
"foodcolor": "navy", | ||
"foodshape": "square", | ||
"foodnum": 2, | ||
"mutesound": True | ||
} | ||
prefs = {"highscore": 0, "bgcolor": "dark green", "foodcolor": "dark red", "foodshape": "circle", "foodnum": 2, "mutesound": True, "headcolor": "white", "tailcolor": "#13325e"} | ||
print('''Color Configurator | ||
enter a hex code or an accepted color name from this list: https://trinket.io/docs/colors NO RGB VALUES''') | ||
prefs["headcolor"] = input("What color would you like the snake head: ") | ||
prefs["tailcolor"] = input("What color would you like the snake tail: ") | ||
with open(os.path.expanduser( | ||
"~/Desktop/SnakeGame/prefs.json"), "w") as write_file: | ||
with open(script_path.joinpath("prefs.json"), "w") as write_file: | ||
json.dump(prefs, write_file) | ||
# writing to text document | ||
print("Succesfuly configured!\nYou will have to restart the game for changes to take effect.") | ||
global changedcolor | ||
changedcolor = True | ||
return | ||
|
||
def snakereset(): | ||
import os | ||
def snakereset(script_path): | ||
print("\n\n\tvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\nThere was an error in the snake color file.\nReseting the document...\n\t^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n") | ||
file = open(os.path.expanduser( | ||
"~/Desktop/SnakeGame/snakeprefs.txt"), "w") | ||
file = open(script_path.joinpath("snakeprefs.txt"), "w") | ||
colorhd = "white" | ||
colortl = "blue" | ||
file.write(f"{colorhd}\n{colortl}") |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.