<commit_before>package database

import (
	"fmt"
	"labix.org/v2/mgo/bson"
	"mud/utils"
	"strings"
)

type Coordinate struct {
	X int
	Y int
	Z int
}

type User struct {
	Id           bson.ObjectId `bson:"_id,omitempty"`
	Name         string
	CharacterIds []bson.ObjectId `bson:"characterids,omitempty"`
}

func newUser(name string) User {
	var user User
	user.Id = bson.NewObjectId()
	user.Name = name
	return user
}

type Character struct {
	Id     bson.ObjectId `bson:"_id"`
	Name   string
	RoomId bson.ObjectId `bson:"roomid"`
}

func newCharacter(name string) Character {
	var character Character
	character.Id = bson.NewObjectId()
	character.Name = name
	character.RoomId = ""
	return character
}

type Room struct {
	Id          bson.ObjectId `bson:"_id"`
	Title       string
	Description string
	Location    Coordinate
	ExitNorth   bool
	ExitEast    bool
	ExitSouth   bool
	ExitWest    bool
	ExitUp      bool
	ExitDown    bool
	Default     bool
}

func newRoom() Room {
	var room Room
	room.Id = ""
	room.Title = "The Void"
	room.Description = "You are floating in the blackness of space. Complete darkness surrounds " +
		"you in all directions. There is no escape, there is no hope, just the emptiness. " +
		"You are likely to be eaten by a grue."<commit_msg>Fixed newRoom()<commit_after>package database

import (
	"fmt"
	"labix.org/v2/mgo/bson"
	"mud/utils"
	"strings"
)

type Coordinate struct {
	X int
	Y int
	Z int
}

type User struct {
	Id           bson.ObjectId `bson:"_id,omitempty"`
	Name         string
	CharacterIds []bson.ObjectId `bson:"characterids,omitempty"`
}

func newUser(name string) User {
	var user User
	user.Id = bson.NewObjectId()
	user.Name = name
	return user
}

type Character struct {
	Id     bson.ObjectId `bson:"_id"`
	Name   string
	RoomId bson.ObjectId `bson:"roomid"`
}

func newCharacter(name string) Character {
	var character Character
	character.Id = bson.NewObjectId()
	character.Name = name
	character.RoomId = ""
	return character
}

type Room struct {
	Id          bson.ObjectId `bson:"_id"`
	Title       string
	Description string
	Location    Coordinate
	ExitNorth   bool
	ExitEast    bool
	ExitSouth   bool
	ExitWest    bool
	ExitUp      bool
	ExitDown    bool
	Default     bool
}

func newRoom() Room {
	var room Room
	room.Id = bson.NewObjectId()
	room.Title = "The Void"
	room.Description = "You are floating in the blackness of space. Complete darkness surrounds " +
		"you in all directions. There is no escape, there is no hope, just the emptiness. " +
		"You are likely to be eaten by a grue."
{'fraction_non_alphanumeric': 0.08959311424100157, 'fraction_numerical': 0.000782472613458529, 'mean_word_length': 3.212520593080725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6687073', 'n_tokens_mistral': 882, 'n_tokens_neox': 867, 'n_words': 275}