This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerController : MonoBehaviour | |
{ | |
private CharacterController _controller; | |
[SerializeField] | |
private float _playerSpeed = 5f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MoveAroundObject : MonoBehaviour | |
{ | |
[SerializeField] | |
private float _mouseSensitivity = 3.0f; | |
private float _rotationY; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
// Normally this is the Car.h file | |
class Car { | |
public: | |
Car(); | |
Car(int hp); | |
~Car(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Palindrome 0(n) with efficient use of memory | |
def isPalindrome(string): | |
if string == "": | |
return None | |
for index in range(len(string)): | |
if string[index] != string[(len(string) - 1) - (index)]: | |
return False | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
pygame.init() | |
pygame.mixer.music.load("music.mp3") | |
pygame.mixer.music.play() | |
screen_width = 800 | |
screen_height = 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lines like this starting with "#" are comments to help explain the code | |
# this is a number guessing game that can be run from run menu in idle or from | |
# the command prompt by typing python guessing_game.py when the command prompt | |
# is in the same directory as the saved game file. | |
# gives us access to the random module to generate the computer's number | |
import random | |
# variables needed for game flow | |
secret = random.randint(1,100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Print statement | |
print('Hello Deniz. I am 25 years old.') | |
# Print statement with Variables | |
name = "Jon" | |
age = '25' | |
def greet(name, age): | |
print('Hello ' + name + '. I am', age, 'years old.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: login | |
In order to use the site | |
As a user | |
I want to login | |
Background: | |
Given a user exists with username "denizsimsek93" and password "123456789" | |
And I am on the "login" page | |
Scenario: Login (with username) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CameraControl : MonoBehaviour { | |
[SerializeField] | |
private GameObject player; | |
[SerializeField] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class CubeMovement : MonoBehaviour { | |
public float speed = 10f; | |
// Update is called once per frame | |
void Update () { | |
float horizontalMovement = Input.GetAxis("Horizontal") * Time.deltaTime * speed; | |
float verticalMovement = Input.GetAxis("Vertical") * Time.deltaTime * speed; |
NewerOlder