aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/Model/Item.scala
blob: 3809561839c68331d52c9fc6bd93907f95b0329d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package o1game.Model

/** The class `Item` represents items in a text adventure game. Each item has a name
  * and a longer description. (In later versions of the adventure game, items may
  * have other features as well.)
  *
  * N.B. It is assumed, but not enforced by this class, that items have unique names.
  * That is, no two items in a game world have the same name.
  *
  * @param name the item’s name
  * @param description the item’s description */
class Item(val name: String, val description: String):

	/** Returns a short textual representation of the item (its name, that is). */
	override def toString = this.name

end Item