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
private void setBooleanArg (char argChar, boolean value) | |
{ | |
booleanArgs.get(argChar).setBoolean(value); | |
} | |
public boolean getBoolean(char arg) | |
{ | |
return falseIfNull (booleanArgs.get(arg).getBoolean()); | |
} |
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
private void setBooleanArg(char argChar, bool value) | |
{ | |
if (booleanArgs.ContainsKey(argChar)) | |
booleanArgs.Remove(argChar); | |
booleanArgs.Add(argChar, Am.setBool(value)); | |
} | |
public bool GetBoolean(char arg) | |
{ |
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
public abstract class GenericParserTests<T> | |
where T : IStringParser | |
{ | |
protected abstract string GetInputHeaderSingleDigit(); | |
// creates and returns intance of class inheriting from IStringParser | |
protected T GetParser(string input) | |
{ | |
return (T)Activator.CreateInstance(typeof(T), input); | |
} |
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
// Rotating with Quaternions. | |
Quaternion rotation = Quaternion.LookRotation(transform.position); | |
rotation *= Quaternion.Euler(0f, 90f, 0f); | |
transform.rotation = | |
Quaternion.Slerp(gameObject.transform.rotation, rotation, 1f); // place holder for testing final position. | |
// Rotating with vector 3 | |
transform.eulerAngles += Vector3.Slerp(gameObject.transform.position, | |
gameObject.transform.position + new Vector3(0f, 90f, 0f), 1f); // place holder for testing final position | |
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
Quaternion target = Quaternion.Euler(0f, 90f, 0f); | |
transform.rotation = Quaternion.Slerp(transform.rotation, transform.rotation * target, 1f); // place holder value |
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
public class Ball : MonoBehaviour | |
{ | |
private IBounce bounce; | |
public void Initialize(IBounce bounce) | |
{ | |
this.bounce = bounce; | |
} | |
void Update () |
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
public class Ball : MonoBehaviour | |
{ | |
private IBounce bounce; | |
public void Initialize(IBounce bounce) | |
{ | |
this.bounce = bounce; | |
} | |
void Update () |
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
Public class DoSomething : IDoSomething | |
{ | |
public void DoSomethingCool() | |
{ | |
//Do Something Cool | |
} | |
} |
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
Peg *pegToMoveFrom = nullptr; | |
for (auto peg = pegs.begin(); peg != pegs.end(); peg++) | |
{ | |
// hard coded values need to generalize for N | |
// makes sure to move till all of the pegs are filled. | |
// Then it moves the smallest peg from the goal peg to the auxillary peg | |
// Then it moves the smallest peg from the auxillary peg to the start peg | |
// then it moves the peg on the bottom of the auxillary peg to the goal peg | |
// then it moves the smallest peg to the goal peg. |
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
public Vector3 Jump(bool pressed) | |
{ | |
return jumpAnimations[jumpComparision(pressed)].Invoke(); | |
} | |
private int jumpComparision(bool pressed) | |
{ | |
if (pressed && !savedPress && !hasJumped) | |
returnValue = (int)JumpComparison.ON_Press; | |
else if (pressed && jumpVelocity.y > 0.0f) |
OlderNewer