🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #1553

Question about adding

#1553
From: Bert Edens
Date: Mon, 05 Oct 1992 12:05
16 lines
968 bytes
Greetings...
    I wanted to get some suggestions on the best way to attack a problem.
I'm writing an adventure-type of game (no, not for a class :-) and wanted
to know the quickest way to add up their total hit points. The fact is
stored like:
    monster(orc,4).
where the latter is the number of hit points. What I want to do is add up a
group of them and get the total hit points for an attack party. For
example, it might be:
    monster(orc,4). monster(kobold,5). monster(goblin,8).
and I want to add them up.

Thanks...
   -Bert

 * Origin: Hillbilly Korner BBS - (501) 751-3714 (1:391/1160)
Technical Details
Message-ID: <718322659.0@nwark.FidoNet>
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!engr.uark.edu!nwark!UUCP

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!engr.uark.edu!nwark!UUCP
From: Bert.Edens@f1160.n391.z1.FidoNet.Org (Bert Edens)
Newsgroups: comp.lang.prolog
Subject: Question about adding
Message-ID: <718322659.0@nwark.FidoNet>
Date: 5 Oct 92 12:05:00 GMT
Sender: UUCP@p0.f1060.n391.z1.FidoNet.Org
Lines: 16