Skip to content

Instantly share code, notes, and snippets.

View MrSimsek's full-sized avatar
🎸
Jamming in Javascript

Deniz Simsek MrSimsek

🎸
Jamming in Javascript
View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
private CharacterController _controller;
[SerializeField]
private float _playerSpeed = 5f;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveAroundObject : MonoBehaviour
{
[SerializeField]
private float _mouseSensitivity = 3.0f;
private float _rotationY;
#include <iostream>
using namespace std;
// Normally this is the Car.h file
class Car {
public:
Car();
Car(int hp);
~Car();
# 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
@MrSimsek
MrSimsek / drawing.py
Last active May 26, 2019 12:15
Draw some shapes and make a simple brush with background music
import pygame
pygame.init()
pygame.mixer.music.load("music.mp3")
pygame.mixer.music.play()
screen_width = 800
screen_height = 600
# 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)
# 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.')
@MrSimsek
MrSimsek / login.feature
Last active March 20, 2019 15:32
Cucumber feature for BDD Testing
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)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraControl : MonoBehaviour {
[SerializeField]
private GameObject player;
[SerializeField]
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;