Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Battle script
by vladb (Vicar) on Jun 06, 2002 at 13:01 UTC | |
I believe one could come up with pretty much anything and it'll fit your description. Just the other day I wrote this line of code, So, basically, variable $max_lines leaves variable $line in the dumps if you consider $line-- as a variable loosing HP, {GRIN}. UPDATE: Or how abut this: This 'game' playes out as follows: you says: "The barer the bones, the better" I guess my code is as 'bare' as you can get (unless some monk out there wants to challange me)! ;-) _____________________
| [reply] [d/l] [select] |
by Dog and Pony (Priest) on Jun 06, 2002 at 13:29 UTC | |
You have moved into a dark place. It is pitch black. You are likely to be eaten by a grue. | [reply] [d/l] |
by rob_au (Abbot) on Jun 06, 2002 at 14:46 UTC | |
Consider the following where Quantum::Entanglement has been used such that the victor is truly not known until the battle has been fought!
Yes, I was bored :-)
| [reply] [d/l] [select] |
Re: Battle script
by Joost (Canon) on Jun 06, 2002 at 13:32 UTC | |
Ok. I'll bite... For this you need a ithreading perl (this is only tested on 5.8.0 RC1)
Maybe not bare bones, but certainly bleading edge :-)
| [reply] [d/l] [select] |
by Abigail-II (Bishop) on Jun 06, 2002 at 16:16 UTC | |
Abigail | [reply] [d/l] |
Re: fighting script
by broquaint (Abbot) on Jun 06, 2002 at 13:03 UTC | |
HTH
_________ | [reply] |
Re: fighting script
by Juerd (Abbot) on Jun 06, 2002 at 13:13 UTC | |
Errrh..... /me laughs | [reply] [d/l] |
Re: Battle script
by Ovid (Cardinal) on Jun 06, 2002 at 15:57 UTC | |
That reminds me of an article I had read some time ago. I can't recall where, but I'll summarize it and if anyone wants to work with it. This was a long time ago, so my memory is probably wrong about some aspects. Essentially, the article was about a computer program that allows you to use two programs to fight. You have a series of addresses (the arena) where the last address connects to the first (like a circle) and each program "lives" in the arena. There was a very basic assembler-like language that controlled what each could do. Commands were fairly straightforward and the language was, IIRC, turing-complete. The goal of each program was to disable the other. For example, one of the most successful programs, the "imp gun", was four lines long (and addresses, the way the languages worked): With a program that small, it was awfully tough to disable (by moving a bad instruction to it). It simply laid down a string of null commands and if any of them hit the opponent, the opponent would be disabled. Some programs would try to find the other program (maybe a binary search of an imp-gun trail, for example), others would lay decoys and move themselves, etc. This could be a fun project :) Cheers, Join the Perlmonks Setiathome Group or just click on the the link and check out our stats. | [reply] |
by Chmrr (Vicar) on Jun 06, 2002 at 18:36 UTC | |
[reply] | |
by Aristotle (Chancellor) on Jun 06, 2002 at 19:56 UTC | |
____________ Makeshifts last the longest. | [reply] |
by Dog and Pony (Priest) on Jun 06, 2002 at 19:25 UTC | |
Really too bad that some of them decided to use their knowledge that way. Not to say that all (or even most) virus writers had that kind of background, or that playing that game was a bad thing - it really sounds like tremendous fun. :) You have moved into a dark place. It is pitch black. You are likely to be eaten by a grue. | [reply] |