Re: hello nice to be here i'm new here

new topic     » goto parent     » topic index » view thread      » older message » newer message

thanks!

here is a console game i made in euphoria...

include std/console.e 
 
constant SUCCESS = 1 
constant NEUTRAL = 2 
constant FAILED = 3 
 
global integer avishai_happy = 0 
global integer avishai_sad = 0 
global atom over = 1 
 
procedure show_results(integer result) 
      switch result do 
        case SUCCESS then 
            puts(1, "\nAvishai is happy.") 
            puts(1, "\nAnd you are happy too and you Hug him") 
            puts(1, "\nHe smiles at you without words") 
            puts(1, "\nAnd you feel Love Towards Him and From Him.") 
            avishai_happy += 1 
            break 
        case NEUTRAL then 
            puts(1, "\nAvishai is apathetic.") 
            puts(1, "\nHe is Deep Into his Autistic Apathy") 
            puts(1, "\nAt least he Is Not Crying") 
            puts(1, "\nYou look at his Sadden Wishing he was Normal.") 
            break 
        case FAILED then 
            puts(1, "\nAvishai cries.") 
            puts(1, "\nYou try your Best to Comfort Him") 
            puts(1, "\nBut in Vain He cries out Load") 
            puts(1, "\nHe cries His Poor Little Heart Out") 
            puts(1, "\nAnd you Cry Too over Both of You.") 
            avishai_sad += 1 
            break 
    end switch 
     
end procedure 
 
procedure game_turn() 
    integer choice 
 
    puts(1, "\nIt's a new day in 1988.\n\n") 
    puts(1, "Options:\n") 
    puts(1, "1. Feed Avishai\n") 
    puts(1, "2. Give him medications\n") 
    puts(1, "3. Take him to the public garden\n") 
    puts(1, "4. Play music for him\n") 
    puts(1, "5. Put Avishai to bed\n") 
    puts(1, "6. Exit the game\n") 
 
    choice = prompt_number("", {1, 6}) 
    clear_screen() 
      switch choice do 
        case 1 then 
            show_results(rand(3)) 
            break 
        case 2 then 
            show_results(rand(3)) 
            break 
        case 3 then 
            show_results(rand(3)) 
            break 
        case 4 then 
            show_results(rand(3)) 
            break 
        case 5 then 
            show_results(rand(3)) 
            break 
        case 6 then 
            puts(1, "Exiting the game.") 
            over = 0 
            break 
 
--~         else 
--~             puts(1, "Invalid choice. Try again.") 
    end switch 
    wait_key() 
    clear_screen() 
end procedure 
 
procedure opening() 
    puts(1, "DEDICATED TO MY LITTLE BROTHER\n\n") 
    puts(1, "           AVISHAI\n\n") 
    puts(1, "FOREVER IN MY HEART OH BROTHER <3")  
    wait_key() 
    clear_screen() 
end procedure 
 
procedure main() 
     
    while over = 1 do 
        game_turn() 
    end while 
    printf(1, "\n\nAvishai was happy %d times.",  avishai_happy ) 
    printf(1, "\n\nAvishai was sad %d times.",  avishai_sad ) 
end procedure 
 
opening() 
main() 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu