From 65ed70815ea024485c509d623ed2706ce110ee00 Mon Sep 17 00:00:00 2001 From: phear Date: Tue, 6 Sep 2005 18:30:58 +0000 Subject: [PATCH] removed old and unused scripts --- documentation/development/README | 4 +++ mptest.py | 7 ----- old_functions.py | 51 -------------------------------- test.py | 3 -- 4 files changed, 4 insertions(+), 61 deletions(-) delete mode 100755 mptest.py delete mode 100755 old_functions.py delete mode 100644 test.py diff --git a/documentation/development/README b/documentation/development/README index 4262e15..031671a 100644 --- a/documentation/development/README +++ b/documentation/development/README @@ -7,6 +7,10 @@ the init_webgo.main() in main.py reinitializes the whole database on each call, comment the line out if you do not want that. init_webgo also creates two test users, gast and gast2. password = username. you can use those to log in. ------------------------------------------ +want to create your own goban images? Simple: just replace the images in +imgsource/ with the desired ones. then run generate_goban_images.py and +the new images get written to img/. +------------------------------------------ some code snippets for reference: diff --git a/mptest.py b/mptest.py deleted file mode 100755 index d91cae8..0000000 --- a/mptest.py +++ /dev/null @@ -1,7 +0,0 @@ -from mod_python import apache - -def handler(req): - req.write("Hello World!") - return apache.OK - - diff --git a/old_functions.py b/old_functions.py deleted file mode 100755 index fdd3415..0000000 --- a/old_functions.py +++ /dev/null @@ -1,51 +0,0 @@ -def init_goban(size=9): - """ - Returns an empty goban in the form of a dictionary where the keys are - x,y-tuples: (1,1) is the upper left corner, (9,9) the lower right one - for a 9x9 goban. - The additional key named size contains the length of a side of the goban. - Content of a field: - 0 == empty field - 1 == white stone on field - 2 == black stone on field - Field turn_number: Current turn to be played. Even: white, uneven: black. - Optional argument size: define length of a side of the goban (one of - 9, 12 or 19). Defaults to 9. - Returns dictionary. - """ - goban = {} - for x in range(1,size+1): - for y in range(1,size+1): - goban[(x,y)] = 0 - if (size == 9) or (size == 13) or (size == 19): - goban["size"] = size - else: - goban["size"] = 9 - goban["turn_number"] = 1 - - #some stones for testing purposes - goban[(1,2)] = 1; goban[(2,1)] = 1; goban[(2,3)] = 1; goban[(3,3)] = 1; goban[(6,7)] = 1; goban[(6,9)] = 1 - goban[(2,2)] = 2; goban[(1,3)] = 2; goban[(4,7)] = 2; goban[(4,9)] = 2; goban[(5,8)] = 2; goban[(7,9)] = 2 - - return goban - - -def save_goban(goban): - """gets a goban dictionary and pickles it to a file. - """ - try: - f = open(picklefile,"w") - pickle.dump(goban,f) - f.close() - except: - print "error: could not write to file "+picklefile+"!" - -def load_goban(): - """trys to load and return a pickled goban. If this does not work return - a newly initialized goban.""" - try: - f = open(picklefile,"r") - return pickle.load(f) - f.close() #datei ist jetzt genullt - except: - return init_goban() \ No newline at end of file diff --git a/test.py b/test.py deleted file mode 100644 index e2a1d50..0000000 --- a/test.py +++ /dev/null @@ -1,3 +0,0 @@ -def hello(req): - x = "Hello, world!" - return x