Fixed bugs, minor changes
authorSam Moore <[email protected]>
Sun, 11 Dec 2011 14:24:40 +0000 (22:24 +0800)
committerSam Moore <[email protected]>
Sun, 11 Dec 2011 14:24:40 +0000 (22:24 +0800)
commitbaf69b8ddea3e2749f114a1e82bc1253ef062bc0
tree336be205cd51fff53a6f19315f910d36b9701fa8
parent56b7e6953bb854114e145947f9cad90f16456a5f
Fixed bugs, minor changes

Fixed segfault in manager caused by attempt to print invalid setups to log
Fixed SIGPIPE in manager caused by attempt to message non-existant programs.

Although I previously fixed a similar SIGPIPE, It is also possible for a file to exist but not have executable permissions set.
Controllers set to use such files as executables were returning true for Valid(), but were in fact, not valid at all.

Use the access function (thanks stack overflow!) to check for executable permissions
and existence in Program::Program. If they aren't set, or file doesn't exist, set
pid to -1 which is an "invalid" controller.

Discovered python trick which allows me to get rid of stupid "run.py" files for the python AIs.

Modified the simulate script to take the number of rounds as an argument.
Also made its output slightly prettier.

Currently testing simulation of 10 rounds on my laptop at home.

"./simulate 10; shutdown -h -P now"

I hope it doesn't set the desk on fire while I'm asleep... :S

Oh, and the VM is finally setup, hooray!
progcomp/agents/asmodeus/asmodeus.py [changed mode: 0644->0755]
progcomp/agents/asmodeus/info
progcomp/agents/asmodeus/run.py [deleted file]
progcomp/agents/basic_python/basic_python.py [changed mode: 0644->0755]
progcomp/agents/basic_python/run.py [deleted file]
progcomp/judge/manager/game.cpp
progcomp/judge/manager/main.cpp
progcomp/judge/manager/program.cpp
progcomp/judge/manager/program.h
progcomp/judge/simulator/Makefile
progcomp/judge/simulator/simulate.py

UCC git Repository :: git.ucc.asn.au