Labyrinth7/Labyrinth7Game — pull request #17 by Enlightment (2014-05-31 23:15:35+00:00)
Title: Implementing GameStatus and Runing Game handler, Running game with an in...

Adding reference to class library GameHandler

LabyrinthGame inherits GameHandler class library Interface IGame.
LabyrinthGame class - remove static access modifier
Move Main() method content to LabyrinthGame contructor.
Implement game state:
Add field gameState and initialize in constructor property this.GameState = GameState.New;

GameEntry Main() -> call method Run() from Game class in GameHandler library passing LabyrinthGame type and chosen user interface for the DrawHandler
-----------------------------------------------------

Adding labyrinth’s width and height to private constants labyrinthRows & labyrinthCols in LabyrinthGame class.

Removing positionX = positionY = 3; // player position . It has to be in class Player.

Creating Interface IPlayer
class Player:
change public fields to private
add default values of fields
add public properties
changing references from fields to properties in class Player
inheriting and implementing interface IPlayer
Creating an instance of class Player in LabyrinthGame passing as arguments initial x and y position of Player (in the middle of the labyrinth)
Removing positionX = positionY = 3; // player position
Change references to positionX and positionY to this.Player.PositionX and this.Player.PositionY

public static void Add(List s, int m)
s.Add(new Player(m, name));
TO:
s[4].Name = name;

Rename class Test() to Update()
Rename flag2 -> isInLabyrinth
Remove static from isInLabyrinth (to access it in Update method)
Change x and y to this.Player.PositionX and this.Player.PositionY
declaring labyrinth field outside the constructor as a public field
Changing references to this.
public static void Test(string[,] labyrinth, bool isInLabyrinth, int x, int y)
TO
public void Update()