Skip to content

Instantly share code, notes, and snippets.

@slimbo
Created November 20, 2012 02:36
Show Gist options
  • Select an option

  • Save slimbo/4115564 to your computer and use it in GitHub Desktop.

Select an option

Save slimbo/4115564 to your computer and use it in GitHub Desktop.
Hit the Bits! - BugEater Example in C#
interface BugEater
{
void consume(Bug bug);
}
class Aardvark : BugEater
{
public void consume(Bug bug)
{
// code goes here
}
}
class VenusFlyTrap : BugEater
{
public void consume(Bug bug)
{
// code goes here
}
public void consume(Water water)
{
// code goes here
}
public void consume(Sunlight sunlight)
{
// code goes here
}
public void grow()
{
// code goes here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment