Hey all. Just to let you all know before I begin, I am relatively new to programming, particularly when it comes to coding a game.
The game I am looking to code for the moment is a simple, MUD style text adventure game. I want to start by keeping it single player and add in the multiplayer aspect later. I have been going through a lot of tutorials for AS3 and even Javascript. As I understand it, Jave is close to AS3 in Syntax.
So, I started to code in my classes first as a starting point, I believe by doing them first I will avoid issues later and will have a better idea of what I have to do. However, I have come across an issue. The Auto Formater threw a hissy fit at me and told me there was an error "near line: }"
Would appreciate if it someone could have a look please?
Also, if there is any advice you can give me, that would be appreciated too.
package
{
//defining the player class. This is the object defining the player.
//Last Modification date: July 07, 2014
public class Player
{
private var pName:String;
private var pGender:String;
private var pRace:String;
private var pClass:String;
private var pDescription:String;
private var pStrength:int;
private var pEndurance:int;
private var pAgility:int;
private var pIntelligence:int;
private var pHitPoints:int;
private var pSovPieces:int;
private var pInventory:Array = new Array();
}
//Defining the Location Class.
//Last Modification: July 07, 2014
public class Location
{
private const l_roomTitle:String;
private const l_roomDescription:String;
private const l_vecExits:Vector;
private var l_roomInventory:Array = new Array;
//Return Location Title
public function getTitle()
{
return l_roomTitle;
}
//Assigns Location Title
public function setTitle (roomTitle:String)
{
l_roomTitle = roomTitle;
}
}
//
//
// Exit - represents an exit to a location
//
// Last modification date : July 07, 2014
//
public class Exit
{
// Numerical codes
public const UNDEFINED:int = 0;
public const NORTH:int = 1;
public const SOUTH:int = 2;
public const EAST:int = 3;
public const WEST:int = 4;
public const UP:int = 5;
public const DOWN:int = 6;
public const NORTHEAST:int = 7;
public const NORTHWEST:int = 8;
public const SOUTHEAST:int = 9;
public const SOUTHWEST:int = 10;
public const IN:int = 11;
public const OUT:int = 12;
// String codes
const directionNames:Array = new Array(
"UNDEFINED",
"NORTH",
"SOUTH",
"EAST",
"WEST",
"UP",
"DOWN",
"NORTHEAST",
"NORTHWEST",
"SOUTHEAST",
"SOUTHWEST",
"IN",
"OUT"
);
const shortDirectionNames:Array = new Array(
"NULL",
"N",
"S",
"E",
"W",
"U",
"D",
"NE",
"NW",
"SE",
"SW",
"I",
"O"
);
}