// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Space)) { Debug.LogFormat("Current board state:\n{0}", CurrentBoardState.ToString()); } if (Input.GetKeyDown(KeyCode.S)) { Solve_TreeSolver(); } if (Input.GetMouseButtonDown(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray.origin, ray.direction, out RaycastHit hit, float.PositiveInfinity, _tileLayer)) { Tile tile = hit.transform.parent.gameObject.GetComponent <Tile>(); Play(tile); } } }
public void Move(Directions direction) { CurrentBoardState = CurrentBoardState.Move(direction); _moves.Add(direction); }