Author: iwontbecreative
Date: Thu Mar 24 21:52:22 2011
New Revision: 48992
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48992&view=rev
Log:
More whitespace removal
Modified:
trunk/data/tools/README
trunk/utils/README
trunk/utils/ai_test/ai_test.py
trunk/utils/ai_test/ai_test2.py
Modified: trunk/data/tools/README
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/README?rev=48992&r1=48991&r2=48992&view=diff
==============================================================================
--- trunk/data/tools/README (original)
+++ trunk/data/tools/README Thu Mar 24 21:52:22 2011
@@ -1,5 +1,5 @@
Tools for hacking or generating WML, maps, images, and sounds belong here.
-Tools for sanity-checking the mainline campaigns and associated data
+Tools for sanity-checking the mainline campaigns and associated data
also belong here.
== Scripts ==
@@ -23,7 +23,7 @@
Experimental tool that can hack a .cfg referring to a mapfile so that
all macros with X,Y coordinate pair arguments get their calls transformed
-in a specified way. Now supports only flipping the map around the Y
+in a specified way. Now supports only flipping the map around the Y
axis, but provides a framework that should make other transformations
easy.
@@ -69,14 +69,14 @@
=== terrain2wiki.rb ===
A script to create the "Terrain Table" on the TerrainLettersWML wiki page.
-Run this and splice the outtput into the wiki whenever you add a new
+Run this and splice the outtput into the wiki whenever you add a new
terrain type to mainline.
== Python API ==
=== wmltools.py ===
-The main facility in this module is a cross-referencer class.
+The main facility in this module is a cross-referencer class.
It also contains utility methods for working with the data tree.
See the header comment of wmltools.py for details
Modified: trunk/utils/README
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/README?rev=48992&r1=48991&r2=48992&view=diff
==============================================================================
--- trunk/utils/README (original)
+++ trunk/utils/README Thu Mar 24 21:52:22 2011
@@ -2,6 +2,6 @@
mostly to support packaging, code integrity checks, and control of the
Wesnoth servers.
-Tools that work on data (WML, maps, images, sounds) no longer belong here.
+Tools that work on data (WML, maps, images, sounds) no longer belong here.
Go to data/tools for those.
Modified: trunk/utils/ai_test/ai_test.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/ai_test/ai_test.py?rev=48992&r1=48991&r2=48992&view=diff
==============================================================================
--- trunk/utils/ai_test/ai_test.py (original)
+++ trunk/utils/ai_test/ai_test.py Thu Mar 24 21:52:22 2011
@@ -23,7 +23,7 @@
end_turn = '0'
version_string = ''
winner_side = '0'
-
+
def
__init__(self,_ai_config1,_ai_config2,_faction1,_faction2,_map,_test):
self.ai_config1 = _ai_config1
self.ai_config2 = _ai_config2
@@ -45,10 +45,10 @@
else:
optmap='--scenario='+map
- return wesnoth+' '+options+' '+optmap+' '+ai_config1+' '+ai_config2
+ return wesnoth+' '+options+' '+optmap+' '+ai_config1+' '+ai_config2
def do_filter(str,substring):
- n = str.find(substring)
+ n = str.find(substring)
if (n>-1):
return n,str[n+len(substring):].strip()
return n,''
@@ -66,14 +66,14 @@
str = filter_non_printable(line.strip())
n,s = do_filter(str,'info ai/testing: WINNER:')
if (n>-1):
- #print 'AND THE WINNER IS: '+s
+ #print 'AND THE WINNER IS: '+s
game_result.winner_side = s
game_result.is_success = 'true'
continue
n,s = do_filter(str,'info ai/testing: VERSION:')
if (n>-1):
- #print 'AND THE VERSION IS: '+s
+ #print 'AND THE VERSION IS: '+s
game_result.version_string = s
n1 = s.rfind('(')
n2 = s.rfind(')')
@@ -90,43 +90,43 @@
n,s = do_filter(str,'info ai/testing: GAME_END_TURN:')
if (n>-1):
- #print 'AND THE VICTORY_TURN IS: '+s
+ #print 'AND THE VICTORY_TURN IS: '+s
game_result.end_turn = s
continue
n,s = do_filter(str,'info ai/testing: AI_IDENTIFIER1:')
if (n>-1):
- #print 'AND THE AI_IDENTIFIER1 IS: '+s
+ #print 'AND THE AI_IDENTIFIER1 IS: '+s
game_result.ai_ident1 = s.strip()
continue
n,s = do_filter(str,'info ai/testing: AI_IDENTIFIER2:')
if (n>-1):
- #print 'AND THE AI_IDENTIFIER2 IS: '+s
+ #print 'AND THE AI_IDENTIFIER2 IS: '+s
game_result.ai_ident2 = s.strip()
continue
n,s = do_filter(str,'info ai/testing: FACTION1:')
if (n>-1):
- #print 'AND THE FACTION1 IS: '+s
+ #print 'AND THE FACTION1 IS: '+s
game_result.faction1 = s
continue
n,s = do_filter(str,'info ai/testing: FACTION2:')
if (n>-1):
- #print 'AND THE FACTION2 IS: '+s
+ #print 'AND THE FACTION2 IS: '+s
game_result.faction2 = s
continue
game_result.duration = time() - start
if (game_result.is_success=='false'):
print 'Warning: not success!'
- print '===================='
+ print '===================='
print 'stderr:'
for line in outerrlines:
print filter_non_printable(line.strip())
- print '===================='
-
+ print '===================='
+
return game_result
def save_result(cfg,game_result):
@@ -152,7 +152,7 @@
yield cfg.get('default','map'+`mp`);
mp= mp+1
except:
- return
+ return
def tests(cfg):
ai1=cfg.get('default','ai_config1').strip()
@@ -173,7 +173,7 @@
else:
game_result = GameResult(ai2,ai1,f2,f1,map,'default')
yield game_result
-
+
# main
cfg = ConfigParser.ConfigParser()
@@ -182,5 +182,3 @@
for test in tests(cfg):
game_result = run_game(cfg,test)
save_result(cfg,game_result)
-
-
Modified: trunk/utils/ai_test/ai_test2.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/ai_test/ai_test2.py?rev=48992&r1=48991&r2=48992&view=diff
==============================================================================
--- trunk/utils/ai_test/ai_test2.py (original)
+++ trunk/utils/ai_test/ai_test2.py Thu Mar 24 21:52:22 2011
@@ -23,7 +23,7 @@
end_turn = '0'
version_string = ''
winner_side = '0'
-
+
def
__init__(self,_ai_config1,_ai_config2,_faction1,_faction2,_map,_test):
self.ai_config1 = _ai_config1
self.ai_config2 = _ai_config2
@@ -44,11 +44,11 @@
optmap=''
else:
optmap='--scenario='+map
-
- return wesnoth+' '+options+' '+optmap+' '+ai_config1+' '+ai_config2
+
+ return wesnoth+' '+options+' '+optmap+' '+ai_config1+' '+ai_config2
def do_filter(str,substring):
- n = str.find(substring)
+ n = str.find(substring)
if (n>-1):
return n,str[n+len(substring):].strip()
return n,''
@@ -66,14 +66,14 @@
str = filter_non_printable(line.strip())
n,s = do_filter(str,'info ai/testing: WINNER:')
if (n>-1):
- print 'AND THE WINNER IS: '+s
+ print 'AND THE WINNER IS: '+s
game_result.winner_side = s
game_result.is_success = 'true'
continue
n,s = do_filter(str,'info ai/testing: VERSION:')
if (n>-1):
- #print 'AND THE VERSION IS: '+s
+ #print 'AND THE VERSION IS: '+s
game_result.version_string = s
n1 = s.rfind('(')
n2 = s.rfind(')')
@@ -90,43 +90,43 @@
n,s = do_filter(str,'info ai/testing: GAME_END_TURN:')
if (n>-1):
- print 'AND THE VICTORY_TURN IS: '+s
+ print 'AND THE VICTORY_TURN IS: '+s
game_result.end_turn = s
continue
n,s = do_filter(str,'info ai/testing: AI_IDENTIFIER1:')
if (n>-1):
- #print 'AND THE AI_IDENTIFIER1 IS: '+s
+ #print 'AND THE AI_IDENTIFIER1 IS: '+s
game_result.ai_ident1 = s.strip()
continue
n,s = do_filter(str,'info ai/testing: AI_IDENTIFIER2:')
if (n>-1):
- #print 'AND THE AI_IDENTIFIER2 IS: '+s
+ #print 'AND THE AI_IDENTIFIER2 IS: '+s
game_result.ai_ident2 = s.strip()
continue
n,s = do_filter(str,'info ai/testing: FACTION1:')
if (n>-1):
- #print 'AND THE FACTION1 IS: '+s
+ #print 'AND THE FACTION1 IS: '+s
game_result.faction1 = s
continue
n,s = do_filter(str,'info ai/testing: FACTION2:')
if (n>-1):
- #print 'AND THE FACTION2 IS: '+s
+ #print 'AND THE FACTION2 IS: '+s
game_result.faction2 = s
continue
game_result.duration = time() - start
if (game_result.is_success=='false'):
print 'Warning: not success!'
- print '===================='
+ print '===================='
print 'stderr:'
for line in outerrlines:
print filter_non_printable(line.strip())
- print '===================='
-
+ print '===================='
+
return game_result
def save_result(cfg,log_file,game_result):
@@ -143,7 +143,7 @@
yield cfg.get('default','map'+`mp`);
mp= mp+1
except:
- return
+ return
def tests(cfg):
ai1=cfg.get('default','ai_config1').strip()
@@ -164,7 +164,7 @@
else:
game_result = GameResult(ai2,ai1,f2,f1,map,'default')
yield game_result
-
+
# main
cfg = ConfigParser.ConfigParser()
@@ -175,4 +175,4 @@
log_file.flush();
for test in tests(cfg):
game_result = run_game(cfg,test)
- save_result(cfg,log_file,game_result)
+ save_result(cfg,log_file,game_result)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits