webgo now utilizes gnugo to evaluate moves. The game is now playable (though I dont know what happens if someone wins/finishes a game :))

This commit is contained in:
phear 2005-09-23 14:37:07 +00:00
parent 2630332479
commit cc76ec975b
12 changed files with 504 additions and 83 deletions

View file

@ -1,3 +1,5 @@
-------------------- installing GnuGo ----------------------
apt-get install gnugo
----------------- creating the database --------------------
#installing PostgreSQL the Debian way
apt-get install postgresql

View file

@ -12,22 +12,30 @@ imgsource/ with the desired ones. then run generate_goban_images.py and
the new images get written to img/.
------------------------------------------
overview of the files:
main.py - the main script. Essentially a wrapper that prints the
main.py -the main script. Essentially a wrapper that prints the
traceback if something went wrong.
login.py - this file contains functions for login and game
login.py -this file contains functions for login and game
selection/modification.
goban.py - code for displaying a goban as a html page.
psql.py - all functions directly accessing the database.
init_webgo.py - re-initialize the whole game. deletes everything and
goban.py -code for displaying a goban as a html page.
psql.py -all functions directly accessing the database.
init_webgo.py -re-initialize the whole game. deletes everything and
sets some defaults.
helper.py - small functions for string manipulation etc.
helper.py -small functions for string manipulation etc.
generate_goban_images.py
- recreate the goban images. just run from console.
-recreate the goban images. just run from console.
gnugo.py -contains functions using gnugo in gtp mode. used for
evaluating wether or not a move is legal.
filehandling.py -contains functions for, well, file handling ;>
------------------------------------------
coding guidelines
tab == 4 whitespaces.
function names are lowercase with _ as a seperator.
function names are all lowercase with _ as a seperator.
------------------------------------------
how is the data saved internally:
for each go game a table is generated. this table has a 'sgf' field containing the current board in sgf file format (needed for gnugo move validation). It also has fields for each goban field. The 'sgf' entry is the SPOT for the current state of the board.
If the board gets changed, this means the 'sgf' file gets changed and then the changed fields in the table get
updated accordingly. This is a bit unclean, but it means I do not have to write a sgf parser ;>
------------------------------------------
known bugs:
"DatabaseError: error 'ERROR: current transaction is aborted, commands ignored until end of transaction block"

View file

@ -38,12 +38,12 @@ m6: manage users and game sessions inside database
username and password and is then given the choice of game to play. If
there is only one active game, directly present the goban.
. <--- YOU ARE HERE.
m7: implement Go rules
Do not accept player moves which violate go rules. Remove beaten stones.
Count and display the score for each player.
. <--- YOU ARE HERE.
m8: make it pretty, make it fast.
Create nicer images replacing the old ones which were just for testing
Find bottlenecks and optimize them for speed.

View file

@ -1 +1,6 @@
- hoshi Bilder fuer weisse und schwarze Steine erstellen
- hoshi Bilder fuer weisse und schwarze Steine erstellen
- remove temporarily created files ;>
- what happens if a game is finished?
- add a description field for a goban table
- add a date-of-creation-creation field and a last-changed-field to goban table
- display game list more nicely with players and last change.