Skip to content

Instantly share code, notes, and snippets.

View JackKell's full-sized avatar

Brandon Olson JackKell

View GitHub Profile
using UnityEngine;
public class JumpingCharacterControllerExample : MonoBehaviour
{
[SerializeField] private float jumpHeight;
[SerializeField] private float timeToReachJumpApex;
private Vector3 _velocity;
private Vector3 _oldVelocity;
# getting an integer
def getIntegerInput(prompt: str, lowerBound: int = None, upperBound: int = None) -> int:
while True:
userInput = input(prompt)
try:
userInput = int(userInput)
if lowerBound and userInput < lowerBound:
print(f"Input must be greater than or equal to {str(lowerBound)}")
elif upperBound and userInput > upperBound:
from typing import List, Tuple, Mapping, Set
from collections import defaultdict
Graph = Mapping[str, Set[str]]
Connection = Tuple[str, str]
def createGraph(connections: List[Connection]) -> Graph:
graph: Graph = defaultdict(set)
for a, b in connections: