Subdomain Posts
Haskell | 2 days ago
Haskell | 5 days ago
Haskell | 6 days ago
Haskell | 6 days ago
Haskell | 6 days ago
Haskell | 6 days ago
JavaScript | 8 days ago
None | 8 days ago
Haskell | 9 days ago
Haskell | 9 days ago
Recent Posts
JavaScript | 49 sec ago
XML | 2 min ago
CSS | 2 min ago
None | 3 min ago
None | 3 min ago
None | 3 min ago
REBOL | 3 min ago
None | 4 min ago
PHP | 4 min ago
None | 5 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Anonymous on the 31st of Jan 2010 08:26:43 PM
Download |
Raw |
Embed |
Report
module Main where
import Text.ParserCombinators.Parsec
import Data
.ByteString
.Lex
.Double
import qualified Data.ByteString.Char8 as B
str2float x = case (readDouble x) of
Nothing -> 0
Just (k,rest) -> k
cleanstr s = [ n | n <- s , n/='\r']
tfarm (s1:s2:s3:s4:s5:s6:s7:s8:[]) = [(s1,s2,s3,s4,s5,s6,str2float $ B.pack s7,str2float $ B.pack s8)]
tfarm (s1:s2:s3:s4:s5:s6:s7:s8:t) = (s1,s2,s3,s4,s5,s6,str2float $ B.pack s7,str2float $ B.pack s8):tfarm t
makestr
(s1
,s2
,s3
,s4
,s5
,s6
,s7
,s8
) = "\n<strategy class=\"Farmizzator\" desc=\"Farm"++s1
++ "\" enabled=\"true\" uid=\""++s2
++s3
++"\">\n"++"<target x=\""++s2
++"\" y=\""++s3
++"\" movement=\"attack\" rate=\""++show (37/s8
)++ "\"/>\n"++"<troops type=\"Clubswinger\" min=\"5\" randomise=\"true\" allowLess=\"true\">"++show (trps s7
)++"</troops>\n"++"</strategy>\n"
main = do
Submit a correction or amendment below.
[ previous version ] | [ difference ] | Make A New Post