<commit_before>﻿using UnityEngine;
using System.Collections;

public class Player : MonoBehaviour 
{
	Vector3 pos;

	GenerateLevel gen;
	Gamelog gamelog;

	bool checkUp = false;
	bool checkDown = false;
	bool checkLeft = false;
	bool checkRight = false;
	public bool canMove = true;

	void Start()
	{
		gen = GetComponent<GenerateLevel>();
		gamelog = GetComponent<Gamelog>();
	}

	void Update()
	{
		pos = transform.position;
		checkUp = gen.GetCube(pos.x, pos.z + 1) == 0;
		checkDown = gen.GetCube(pos.x, pos.z - 1) == 0;
		checkLeft = gen.GetCube(pos.x - 1, pos.z) == 0;
		checkRight = gen.GetCube(pos.x + 1, pos.z) == 0;
		int checks = gen.GetCube(pos.x, pos.z + 1) + gen.GetCube(pos.x, pos.z - 1) + gen.GetCube(pos.x - 1, pos.z) + gen.GetCube(pos.x + 1, pos.z);
		if(canMove){
			if(checks >= 3){ 
				gen.NoExit(pos.x, pos.z);
			}else{
				Spawning();
			}
			if(checks < 4 ) Movement();<commit_msg>fixed cubes not generating and spawning while in fight<commit_after>﻿using UnityEngine;
using System.Collections;

public class Player : MonoBehaviour 
{
	Vector3 pos;

	GenerateLevel gen;
	Gamelog gamelog;

	bool checkUp = false;
	bool checkDown = false;
	bool checkLeft = false;
	bool checkRight = false;
	public bool canMove = true;

	void Start()
	{
		gen = GetComponent<GenerateLevel>();
		gamelog = GetComponent<Gamelog>();
	}

	void Update()
	{
		pos = transform.position;
		checkUp = gen.GetCube(pos.x, pos.z + 1) == 0;
		checkDown = gen.GetCube(pos.x, pos.z - 1) == 0;
		checkLeft = gen.GetCube(pos.x - 1, pos.z) == 0;
		checkRight = gen.GetCube(pos.x + 1, pos.z) == 0;
		int checks = gen.GetCube(pos.x, pos.z + 1) + gen.GetCube(pos.x, pos.z - 1) + gen.GetCube(pos.x - 1, pos.z) + gen.GetCube(pos.x + 1, pos.z);
		if(checks >= 3){ 
			gen.NoExit(pos.x, pos.z);
		}else{
			Spawning();
		}
		if(canMove){
			if(checks < 4 ) Movement();
{'fraction_non_alphanumeric': 0.16, 'fraction_numerical': 0.016216216216216217, 'mean_word_length': 3.3450704225352115, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '83588', 'n_tokens_mistral': 830, 'n_tokens_neox': 739, 'n_words': 175}