Marvin the Depressed Android
Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Welcome!
This is an exercise used to practice TDD. In this exercise, we'll build a simple AI for Marvin the Depressed Android.
Marvin should follow some simple rules:
- Marvin responds to most things with "Whatever."
- Marvin responds to questions with "I don't care."
- Marvin responds to silence with "Fine. Waste my time."
- Marvin responds to yelling with "You don't have to yell. I'm right here."
Advanced: Marvin responds to "Was willst du essen?" with "Mir egal." Hint: this is the start of more robust functionality.
Workspace
Marvin the Android
1
2
3
4
5
6
7
8
9
10
11
12
namespace AI
{
public class Marvin
{
public string talk(string statement) {
return null;
}
}
}
Enter to Rename, Shift+Enter to Preview
1
using Microsoft.VisualStudio.TestTools.UnitTesting;
Enter to Rename, Shift+Enter to Preview
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content