[x]

deviantART

 




Program Life Basics; // Can life be like a program?  Let's see!
Uses
   LifeLib;
Var             
   Food, Sleep, Water, Love As Needs;
   Happiness As LifeStrength;
   Death As LifeWeakness;
   Age As Integer;
   Object Person
       Begin
            HasHealth As Status;
        End;        
Constants
   GoToSchool;
   GoToWork;
   StayHome;
  
Begin

   Death := Random(100); // We all know that the death is random.
   Happiness := 2 + Random(5); // Happiness is random too.

     Do
  
            // Should I go to school, to work or stay home?      
        If Age < 18 Then
           GoToSchool;
        Else If Age < 50 Then
           GoToWork;
        Else
           StayHome;
        End;


           // Let's try to survive...!
        If Not Food Then
            Person.HasHealth := False
            Happiness := Happiness - 2
        Else
            Happiness := Happiness + 5
        End;
        If Not Water Then
            Person.HasHealth = False
            Happiness := Happiness - 2
        Else
            Happiness := Happiness + 5
        End;
        If Not Sleep Then
            Person.HasHealth := False
            Happiness := Happiness - 2
        Else
            Happiness := Happiness + 5
        End;
        

               // Let's put some love in the game.
        Read(Love);

         Select Case (Love)
             0 : Happiness := Happiness -  20; Break;
             1 : Happiness := Happiness -  10; Break;
             2 : Break;
             3 : Happiness := Happiness + 10; Break;
             4 : Happiness := Happiness + 15; Break;
         End Case;
       

              // Happy?       
        If  Happiness < -10 Then
            Death := 0                    // Suicide...
        Else If Happiness < 3 Then
            Person.HasHealth := False    // Get Sick...
        Else If Happiness > 80 Then
             Death := Death + 1         // Live longer!
             Happiness := Happiness - 20
        End;

             // Am I sick?
        If Not Person.HasHealth Then
              GoToHospital
        End;
              
          
             // A year has passed.
      Age := Age + 1

     While (Age <= Death);

             // Oops... Game Over.
     WriteLine('Memento Mori...');
     Readkey;
     WriteLine('Game Over');

End.

Procedure GoToHospital
Var
   Methods As GoodOrBad;

  Begin

          // Can I be saved?
    If Methods = Good Then
        Happiness := Happiness + 2
        Death := Death - 1
    Else If Methods = Bad Then
        Happiness = Happiness - 2
        Death := Death - 5
    End;
   
  End;
©2006-2009 ~Meryovi
Details
Submitted: December 31, 2006
File Size: 7.5 KB
Image Size: 3.9 KB
Resolution: 50×50
Comments: 217
Favourites & Collections: 301 [who?]

Views
Total: 5,220
Today: 3

Downloads
Total: 81
Today: 0

Thumb

Author's Comments

-- Version 2.0:
- Comments added / Comentarios añadidos.

Picture / Imagen: "Pascal Vir Ico" by Me.

Programming Languages / Lenguajes de Programación: Visual Basic & Turbo Pascal.

Serie: CyberPoetry

:::::

It was very difficult to categorize it...

Maybe it's too long, and some of you may not understand it...
Sorry! ^^;

Hope you like it! :)

~

Fue muy difícil categorizarlo...

Quizás es muy largo, y puede que algunos de ustedes no lo entiendan...
Disculpen! ^^;

Espero que les guste! :)
Daily Deviation, 2008-02-25

Daily DeviationI was recently asked what exactly is cyber poetry. I respond with this Program Life Basics by =Meryovi. This is a fine and unique example of experimentation in poetry using the unconventional tool of code. (Featured by ^StJoan)

[x]

Devious Comments

love 2 2 joy 3 3 wow 2 2 mad 0 0 sad 0 0 fear 0 0 neutral 0 0

Comments


Gracias, gracias.
No sé de dónde saque esa idea!!

Los lenguajes de programación son Pascal y un poco de C++...
Y si los tipos de variables existieran también corriera!! :giggle:
Hidden by Owner
Que bueno que coge el formato de tabulaciones... hay en algunos sitios que no las coge y es un tormento...
This is definatly intresting. I really like it. so Im faving it right now. :D

--
My enemies are without Honor. I bring them only Vengeance.. and Death.
:aww:
Thank you very much!!
Your very welcome : )

--
My enemies are without Honor. I bring them only Vengeance.. and Death.
Yu yuff! cuanta imaginacion. Muy bueno :) :+fav:

--
[Life's like the weather, you never know when it's gonna change]
pff que complicadooo :O_o:
Muy Bien!!
ya yo te dije en ITESA que te pasate con ese... :P

:+fav:
Si tu le enseñas ese programa a Florecita.:butterfly: te apueto a que te quita punto.

--
Add me!!


-Want more pageviews?GO HERE!!
Ejejejej.... =P

No debería, eso no es asunto de él. =P

Site Map