29 lines
400 B
D
29 lines
400 B
D
module screen;
|
|
|
|
import std.stdio : writeln;
|
|
|
|
class Screen
|
|
{
|
|
private string description;
|
|
|
|
this(string description)
|
|
{
|
|
this.description = description;
|
|
}
|
|
|
|
void up()
|
|
{
|
|
writeln(description ~ " going up");
|
|
}
|
|
|
|
void down()
|
|
{
|
|
writeln(description ~ " going down");
|
|
}
|
|
|
|
override string toString() const
|
|
{
|
|
return description;
|
|
}
|
|
}
|