30 lines
646 B
Plaintext
30 lines
646 B
Plaintext
// Test Room class directly
|
|
using "text_adventure/simple_rooms.hako"
|
|
|
|
print("Creating a room...")
|
|
room = new Room("Test Room", "A simple test room")
|
|
|
|
print("Room created successfully!")
|
|
print("Name: " + room.name)
|
|
print("Description: " + room.description)
|
|
|
|
print("\nTesting visited field...")
|
|
if room.visited {
|
|
print("Room has been visited")
|
|
} else {
|
|
print("Room has not been visited")
|
|
}
|
|
|
|
print("\nCalling look()...")
|
|
result = room.look()
|
|
print(result)
|
|
|
|
print("\nChecking visited after look()...")
|
|
if room.visited {
|
|
print("Room has been visited")
|
|
} else {
|
|
print("Room has not been visited")
|
|
}
|
|
|
|
print("\n✅ Room test completed!")
|