Jump to content
Science Forums

The Programmed Bull (Without Bs)


Recommended Posts

Have you ever thought whether the behavior of a bull can be expressed programmatically..........

 

Here is an attempt to do so (language c#)

 

string animal = textbox1.text;

string motion = 'none';

string enemy = 'enabled';

bool threat = true;

 

if (animal == 'cow') motion = 'graze' return;

 

if (animal == 'bull')

{

while (threat == true)

{

if (enemy == 'disabled') 

{

    enemy = 'enabled';      

    motion = 'graze'

    threat = false; 

    return;

}

else

{

    continue;

}

}

motion = 'graze';

}

 

What does this tell us about -

 

1. Animal behavior

2. Programmatic representation of the same. ?  :beer-fresh:

Edited by petrushkagoogol
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...