Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Cell {
- int i,j;
- bool []walls = new bool [4];// top , right , bottom , left
- bool Isvisited;
- public Cell(int x , int y)
- {
- this.i = x;
- this.j = y;
- Isvisited = false;
- for (int i = 0; i < 4; i++)
- walls[i] = true;
- }
- public void SetVisited(bool temp){
- Isvisited = temp;
- }
- public void SetTop(bool temp){
- walls[0] = temp;
- }
- public void SetRight(bool temp){
- walls[1] = temp;
- }
- public void SetBottom(bool temp){
- walls[2] = temp;
- }
- public void SetLeft(bool temp){
- walls[3] = temp;
- }
- public int Get_i(){
- return i;
- }
- public int Get_j(){
- return j;
- }
- public bool GetTop(){
- return walls[0];
- }
- public bool GetRight(){
- return walls[1];
- }
- public bool GetBottom(){
- return walls[2];
- }
- public bool GetLeft(){
- return walls[3];
- }
- public bool GetVisited(){
- return Isvisited;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement