Skip to content

Instantly share code, notes, and snippets.

View aviralgoel's full-sized avatar
🎯
Focusing

Aviral Goel aviralgoel

🎯
Focusing
View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public float turnSpeed = 20f;
Animator m_Animator;
Vector3 m_Movement;
Rigidbody m_Rigidbody;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public float speed;
private Rigidbody rb;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class PlayerController : MonoBehaviour {
public float speed;
private Rigidbody rb;
void Start ()
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class PlayerMovement : MonoBehaviour
{
public Camera cam;
public NavMeshAgent player;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class EnemyMovement : MonoBehaviour
{
public NavMeshAgent enemy;
public GameObject player;
@aviralgoel
aviralgoel / linked_list.h
Created May 12, 2022 14:40
linked_list.h
#ifndef LINKEDLIST_H_
#define LINKEDLIST_H_
template <typename T>
class Node
{
public:
Node<T>* next;
T data;
};
@aviralgoel
aviralgoel / linked_list.cc
Created May 12, 2022 14:43
linked_list.cc
#include <iostream>
#include <linked_list.h>
// constructor -initialize the head = tail = null and length of the list = 0
template <typename T>
LinkedList<T>::LinkedList () {
this->m_head = NULL;
this->length = 0;
}
@aviralgoel
aviralgoel / linked_list.cc
Created May 12, 2022 14:45
linked_list.cc
#include <iostream>
#include <linked_list.h>
// constructor -initialize the head = tail = null and length of the list = 0
template <typename T>
LinkedList<T>::LinkedList () {
this->m_head = NULL;
this->length = 0;
}
#include <iostream>
#include<linked_list.h>
using namespace std;
int main()
{
LinkedList<int> myList;
for(int i = 0 ; i < 10 ; i++)
{
#include <iostream>
#include <doubly_linked_list.h>
using namespace std;
int main()
{
// a whole lot of testing using the implemented function
// it is better to comment everything here and uncomment it line by line