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
from Tile import Tile | |
import random | |
import usage | |
class Game: | |
def __init__(self, dimension: int, shuffled: bool): | |
entropy_factor = 100 | |
self.dimension = dimension | |
self.blank_label = dimension * dimension |
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 MouseGimbal : MonoBehaviour | |
{ | |
[SerializeField] [Range(0,89)] float maxRotationDegrees = 10.0f; // At 90+ gimbal oddities must be dealt with. | |
[SerializeField] bool ClampToMaxRotationDegrees = true; // Disable for free rotation. | |
[SerializeField] float rotationSpeed = 10.0f; | |
const float fullArc = 360.0f; | |
const float halfArc = 180.0f; |
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
/// FishDrone by JackDraak | |
/// July 2018 | |
/// 'changelog' viewable on GitHub. | |
/// | |
using UnityEngine; | |
public class FishDrone : MonoBehaviour | |
{ | |
private Animator animator; | |
private float changeDelay, changeTime; |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class DroneController : MonoBehaviour { | |
Rigidbody rigidbody; | |
AudioSource audio; | |
bool thrustAudio = false; | |
bool thrustAudioOn = 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
void GetPrimeFactors(uint64_t number) | |
{ | |
if (number == 2) | |
{ | |
primeFactors.push_back(number); | |
return; | |
} | |
int max = floor(sqrt(number)); | |
uint64_t factor; |
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
/* | |
Tic - Tac - Console | |
by: @JackDraak - Playing around: just a humble hobbyist | |
tinkerer, messing with C++ to have fun | |
and maybe even learn something. | |
This is my first working version of a one-player | |
take on the the classic pen and paper (or should I | |
say, "stick and dirt"?) game: tic - tac - toe | |
[designed to now be played on the Windows Console.] | |
Where to go from here: |
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
Transform RandomFreePosition () { | |
Transform[] myEmptyChildren = new Transform[transform.childCount]; | |
int inCount = 0; | |
foreach(Transform childPosition in transform) { | |
if (childPosition.childCount == 0) { | |
myEmptyChildren[inCount] = childPosition; | |
inCount++; | |
} | |
} | |
if (inCount > 0) return myEmptyChildren[Random.Range(0, inCount)]; |
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; | |
using System.Collections; | |
public class Ball : MonoBehaviour { | |
public AudioClip ball; | |
private float currentVelocityX; | |
private float currentVelocityY; | |
//... |
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; | |
using System.Collections; | |
public class Paddle : MonoBehaviour { | |
public AudioClip paddle; | |
private bool autoplay, begun, driftDirection, easy; | |
private Ball ball; | |
private Vector3 ballPos; |
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; | |
using UnityEngine.UI; | |
using System.Collections; | |
public class FadePanel : MonoBehaviour { | |
public float fadeInTime= 1f; | |
private Image fadePanel; | |
private Color currentColor = new Color(0f,0f,0f,1f); // or = Color.black; |
NewerOlder