using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[System.Serializable]
public class MazeRoom
{
	[SerializeField]
    private bool northWall = true;
	[SerializeField]
	private bool southWall = true;
	[SerializeField]
	private bool eastWall = true;
	[SerializeField]
	private bool westWall = true;
	[SerializeField]
	private bool visited = false;

	public MazeRoom()
	{
		northWall = true;
		southWall = true;
		eastWall = true;
		westWall = true;
		visited = false;
	}

	public MazeRoom(bool newNorthWall, bool newSouthWall, bool newEastWall, bool newWestWall, bool newVisited)
	{
		northWall = newNorthWall;
		southWall = newSouthWall;
		eastWall = newEastWall;
		westWall = newWestWall;
		visited = newVisited;
	}

	public bool IsVisited()
	{
		return visited;
	}

	public void MarkVisited()
	{
		visited = true;
	}

	public void DisableWall(MazeWallEnum wall)
	{
		switch (wall)
		{
			case MazeWallEnum.north:
				northWall = false;
				break;
			case MazeWallEnum.south:
				southWall = false;
				break;
			case MazeWallEnum.east:
				eastWall = false;
				break;
			case MazeWallEnum.west:
				westWall = false;
				break;
			default:
				break;
		}
	}

	public bool IsActiveWall(MazeWallEnum wall)
	{
		switch (wall)
		{
			case MazeWallEnum.north:
				return northWall;
			case MazeWallEnum.south:
				return southWall;
			case MazeWallEnum.east:
				return eastWall;
			case MazeWallEnum.west:
				return westWall;
			default:
				return false;
		}
	}
}
