From: Daniel Axtens Date: Wed, 15 Sep 2010 02:35:17 +0000 (+0800) Subject: Final cleanup. X-Git-Tag: v02~1 X-Git-Url: https://git.ucc.asn.au/?p=progcomp10.git;a=commitdiff_plain;h=198e7f79797ac3ff4c1ec3869d2f11a8387b1577 Final cleanup. --- diff --git a/src/link/C/README.txt b/src/link/C/README.txt index e93d251..b7bfc8c 100644 --- a/src/link/C/README.txt +++ b/src/link/C/README.txt @@ -73,6 +73,10 @@ submit it there! Otherwise, sit tight. 10. Watch its progress on the scoreboard and adjust your strategy accordingly. +=== C++ === + +See PLUSPLUS.txt. + === OTHER IMPORTANT NOTES === * Static storage *is* *considered* *cheating*. You must *not* attempt diff --git a/src/link/C/c-link-lib.xcodeproj/project.pbxproj b/src/link/C/c-link-lib.xcodeproj/project.pbxproj deleted file mode 100644 index e4f83ef..0000000 --- a/src/link/C/c-link-lib.xcodeproj/project.pbxproj +++ /dev/null @@ -1,154 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXFileReference section */ - 2208AFE6118F28D800770C92 /* c_wash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = c_wash.c; sourceTree = ""; }; - 2208AFE7118F28F400770C92 /* c_agents.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = c_agents.py; sourceTree = ""; }; - 2291A1BB117EDB9600854CBE /* c_link.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = c_link.c; sourceTree = ""; }; - 2291A1BD117EE3FD00854CBE /* c_angel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = c_angel.c; sourceTree = ""; }; - 2291A1BE117EE3FD00854CBE /* c_lucifer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = c_lucifer.c; sourceTree = ""; }; - 2291A1BF117EE3FD00854CBE /* c_streetfighter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = c_streetfighter.c; sourceTree = ""; }; - 22CAFECF11D48750001ECDEF /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; - 22F652F5117C679300A3793D /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - 22F652F6117C6C9500A3793D /* c_link.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c_link.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* c-link-lib */ = { - isa = PBXGroup; - children = ( - 22CAFECF11D48750001ECDEF /* README */, - 2208AFE7118F28F400770C92 /* c_agents.py */, - 2291A1BC117EE3FD00854CBE /* agents */, - 22F652F6117C6C9500A3793D /* c_link.h */, - 2291A1BB117EDB9600854CBE /* c_link.c */, - 22F652F5117C679300A3793D /* Makefile */, - ); - name = "c-link-lib"; - sourceTree = ""; - }; - 2291A1BC117EE3FD00854CBE /* agents */ = { - isa = PBXGroup; - children = ( - 2291A1BD117EE3FD00854CBE /* c_angel.c */, - 2291A1BE117EE3FD00854CBE /* c_lucifer.c */, - 2291A1BF117EE3FD00854CBE /* c_streetfighter.c */, - 2208AFE6118F28D800770C92 /* c_wash.c */, - ); - path = agents; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXLegacyTarget section */ - D28A88AD04BDD90700651E21 /* c-link-lib */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION)"; - buildConfigurationList = 1DEB918F08733D9F0010E9CD /* Build configuration list for PBXLegacyTarget "c-link-lib" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - buildWorkingDirectory = ""; - dependencies = ( - ); - name = "c-link-lib"; - passBuildSettingsInEnvironment = 1; - productName = "c-link-lib"; - }; -/* End PBXLegacyTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "c-link-lib" */; - compatibilityVersion = "Xcode 3.1"; - hasScannedForEncodings = 1; - mainGroup = 08FB7794FE84155DC02AAC07 /* c-link-lib */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D28A88AD04BDD90700651E21 /* c-link-lib */, - ); - }; -/* End PBXProject section */ - -/* Begin XCBuildConfiguration section */ - 1DEB919008733D9F0010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUGGING_SYMBOLS = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = "c-link-lib"; - }; - name = Debug; - }; - 1DEB919108733D9F0010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = "c-link-lib"; - }; - name = Release; - }; - 1DEB919408733D9F0010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Debug; - }; - 1DEB919508733D9F0010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB918F08733D9F0010E9CD /* Build configuration list for PBXLegacyTarget "c-link-lib" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB919008733D9F0010E9CD /* Debug */, - 1DEB919108733D9F0010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "c-link-lib" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB919408733D9F0010E9CD /* Debug */, - 1DEB919508733D9F0010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/src/link/bundle-agent.sh b/src/link/bundle-agent.sh deleted file mode 100755 index edf55ee..0000000 --- a/src/link/bundle-agent.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash - -# bundle-agent.sh -# progcomp -# -# Written by Daniel Axtens for the UCC Programming Competition in 2010. -# Licensed under an MIT-style license: see the LICENSE file for details. - -# a candidate for porting to python. - -# put ourselves in SRCROOT - src/ -# this assumes we are in the src/link directory. -cd `dirname $0`/.. - -# begin script -cat << __EOF__ -This script takes the code that you have written for UCC::ProgComp 2010 and -bundles it up as an agent that you can test. This script is not needed for code -written in Python. -__EOF__ - - -# select language -lang=0 - -while ([ $lang != 1 ] && [ $lang != 2 ]) do { - - cat << __EOF__ -Is your agent written in: -(1) C -(2) another language (UNSUPPORTED) -__EOF__ - - read -p "Enter 1 or 2: " lang - -} done; - -# C bots -if ([ $lang == 1 ]) then - echo - echo "Preparing a C bot." - echo - - echo "Where is your .c file?" - echo "Provide the full path, including the agent file and the .c" - echo "Give paths relative to the src/ directory." - echo "WARNING: will overwrite \'agent name\'.py if it exists" - - read -p "Path: " path - - location=`dirname $path` - name=`basename $path .c` - - cat > ${location}/${name}.py << __EOF__ -# ${name}.py - a C bot shell generated by `basename $0` for UCC::ProgComp 2010 - -from link.cAgent import cAgent - -class ${name} (cAgent): - def __init__ (self): - cAgent.__init__(self, "${location}/${name}") -__EOF__ - - - -# Custom bots -elif ([ $lang == 2 ]) then - echo - echo "Preparing a custom bot." - echo - - echo "What is the name of your bot?" - - read -p "Name: " name - - echo - echo "Enter the command required to spawn your bot." - echo "Give paths relative to the src/ directory." - - read -p "Command: " cmd - - echo - echo "Into which directory should I put the resultant python module?" - echo "(again, give paths relative to src/)" - echo "WARNING: will overwrite ${name}.py if it exists" - - read -p "Location: " location - - cat > ${location}/${name}.py << __EOF__ -# ${name}.py - a custom bot shell generated by `basename $0` for UCC::ProgComp 2010 -# calls "${cmd}" to invoke the bot - -from link.externAgent import externAgent - -class ${name} (externAgent): - def __init__ (self): - externAgent.__init__(self, "${cmd}") -__EOF__ - - -fi - -### Finish up -echo -echo "${name}.py created." -echo -echo "Include your bot with:" - -#there must be a nicer way to do this. possibly by using python -#part of the horror is trying to deal with location possibly having a trailing -#slash, and possibly not having one. *sigh* -pythonpath=`sed 's:/:.:g' << __EOF__ -$(dirname ${location}/${name}).${name} -__EOF__ -` - -echo " from ${pythonpath} import ${name}" -echo "Then make sure the Agents list includes ${name}" -echo -echo "Good luck!" \ No newline at end of file diff --git a/src/progcomp.xcodeproj/project.pbxproj b/src/progcomp.xcodeproj/project.pbxproj deleted file mode 100644 index b85760a..0000000 --- a/src/progcomp.xcodeproj/project.pbxproj +++ /dev/null @@ -1,169 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXFileReference section */ - 228D541011DB3CEB00258478 /* PythonSampleAgents.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = PythonSampleAgents.py; sourceTree = ""; }; - 228D541311DB443B00258478 /* CSampleAgents.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = CSampleAgents.py; sourceTree = ""; }; - 22CA010611D9BD51001ECDEF /* bundle-agent.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "bundle-agent.sh"; path = "link/bundle-agent.sh"; sourceTree = ""; }; - 22CA010711D9C52B001ECDEF /* cAgent.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = cAgent.py; path = link/cAgent.py; sourceTree = ""; }; - 22CAFEEB11D84076001ECDEF /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; - 22CAFEEC11D84076001ECDEF /* rpsconst.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = rpsconst.py; sourceTree = ""; }; - 22CAFEED11D84076001ECDEF /* SampleAgents.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = SampleAgents.py; sourceTree = ""; }; - 22CAFEEE11D84076001ECDEF /* selectAlgorithms.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = selectAlgorithms.py; sourceTree = ""; }; - 22CAFEEF11D84076001ECDEF /* simulate.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = simulate.py; sourceTree = ""; }; - 22CAFEF011D84076001ECDEF /* uccProgComp.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = uccProgComp.py; sourceTree = ""; }; - 22CAFF7B11D840E3001ECDEF /* __init__.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = __init__.py; path = link/__init__.py; sourceTree = ""; }; - 22CAFF7C11D840E3001ECDEF /* externAgent.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = externAgent.py; path = link/externAgent.py; sourceTree = ""; }; - 22DB7DF31223BAF700E04CAB /* conf.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = conf.py; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* progcomp */ = { - isa = PBXGroup; - children = ( - 22CAFF7711D840CB001ECDEF /* link */, - 22CAFEEB11D84076001ECDEF /* README */, - 22CAFEEC11D84076001ECDEF /* rpsconst.py */, - 22CAFEED11D84076001ECDEF /* SampleAgents.py */, - 22DB7DF31223BAF700E04CAB /* conf.py */, - 22CAFEEE11D84076001ECDEF /* selectAlgorithms.py */, - 22CAFEEF11D84076001ECDEF /* simulate.py */, - 22CAFEF011D84076001ECDEF /* uccProgComp.py */, - 228D540F11DB3CEB00258478 /* arenas */, - ); - name = progcomp; - sourceTree = ""; - }; - 228D540F11DB3CEB00258478 /* arenas */ = { - isa = PBXGroup; - children = ( - 228D541011DB3CEB00258478 /* PythonSampleAgents.py */, - 228D541311DB443B00258478 /* CSampleAgents.py */, - ); - path = arenas; - sourceTree = ""; - }; - 22CAFF7711D840CB001ECDEF /* link */ = { - isa = PBXGroup; - children = ( - 22CA010711D9C52B001ECDEF /* cAgent.py */, - 22CAFF7B11D840E3001ECDEF /* __init__.py */, - 22CAFF7C11D840E3001ECDEF /* externAgent.py */, - 22CA010611D9BD51001ECDEF /* bundle-agent.sh */, - ); - name = link; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXLegacyTarget section */ - D28A88AD04BDD90700651E21 /* progcomp */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "$(ACTION)"; - buildConfigurationList = 1DEB918F08733D9F0010E9CD /* Build configuration list for PBXLegacyTarget "progcomp" */; - buildPhases = ( - ); - buildToolPath = /usr/bin/make; - dependencies = ( - ); - name = progcomp; - passBuildSettingsInEnvironment = 1; - productName = progcomp; - }; -/* End PBXLegacyTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "progcomp" */; - compatibilityVersion = "Xcode 3.1"; - hasScannedForEncodings = 1; - mainGroup = 08FB7794FE84155DC02AAC07 /* progcomp */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D28A88AD04BDD90700651E21 /* progcomp */, - ); - }; -/* End PBXProject section */ - -/* Begin XCBuildConfiguration section */ - 1DEB919008733D9F0010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUGGING_SYMBOLS = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = progcomp; - }; - name = Debug; - }; - 1DEB919108733D9F0010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = progcomp; - }; - name = Release; - }; - 1DEB919408733D9F0010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Debug; - }; - 1DEB919508733D9F0010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB918F08733D9F0010E9CD /* Build configuration list for PBXLegacyTarget "progcomp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB919008733D9F0010E9CD /* Debug */, - 1DEB919108733D9F0010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "progcomp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB919408733D9F0010E9CD /* Debug */, - 1DEB919508733D9F0010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -}