public SteveMovement(Steve steve) { this.steve = steve; horizontal = steve.horizontal; vertical = steve.vertical; this.bob = steve.bob; }
public BobMovement(Bob bob) { this.bob = bob; horizontal = bob.horizontal; vertical = bob.vertical; this.steve = bob.steve; }
// Use this for initialization void Start () { fader = ui.GetComponent<Fading>(); dialog = ui.GetComponent<Dialog>(); bob = bobGO.GetComponent<Bob>(); bob.inputEnable = false; if(Model.Instance.previousScene == "ChambreNuit" || Model.Instance.previousScene == "Intro") { dialogDisplayed = false; SoundScript.playDay(); SoundScript.FadeIn(); } else { Debug.Log("From Salon"); dialogDisplayed = true; bob.inputEnable = true; bob.transform.position = new Vector3(4.4f, -0.9f, -3f); bob.transform.localScale = new Vector2(-1, 1); } }
public Laberinto(List<string> niveles,List<string> eniveles) { this.niveles = niveles; this.eniveles = eniveles; indiceNivel = 0; bloques = Laberinto.armarBloques(niveles[indiceNivel++],out this.pared); jugadores = new List<Jugador>(); Jugador jugador = new Bub(); jugador.Laberinto = this; jugadores.Add(jugador); jugador = new Bob(); jugador.Laberinto = this; jugadores.Add(jugador); /*enemigos = new List<IEnemigo>(); Robotito robotito = new Robotito(new System.Drawing.Point(48, 64), Direccion.derecha); robotito.Laberinto = this; enemigos.Add(robotito); robotito = new Robotito(new System.Drawing.Point(48, 76), Direccion.derecha); robotito.Laberinto = this; enemigos.Add(robotito); Viejita viej = new Viejita(new System.Drawing.Point(48, 84), Direccion.derecha); viej.Laberinto = this; enemigos.Add(viej);*/ enemigos = Laberinto.armarEnemigos(eniveles[0]); foreach (IEnemigo e in enemigos) ((ObjetoVivo)e).Laberinto = this; objetosDisparados = new List<ObjetoDisparado>(); burbujas = new List<Burbuja>(); frutas = new List<Fruta>(); transcurridoFinal = 0; transicion = false; indiceTransicion = 0; }
public async Task <IActionResult> PostOutputAsync([FromQuery, Required] long roundId, [FromBody, Required] OutputRequest request) { if (roundId < 0 || request.Level < 0 || !ModelState.IsValid) { return(BadRequest()); } CcjRound round = Coordinator.TryGetRound(roundId); if (round is null) { TryLogLateRequest(roundId, CcjRoundPhase.OutputRegistration); return(NotFound("Round not found.")); } if (round.Status != CcjRoundStatus.Running) { TryLogLateRequest(roundId, CcjRoundPhase.OutputRegistration); return(Gone("Round is not running.")); } CcjRoundPhase phase = round.Phase; if (phase != CcjRoundPhase.OutputRegistration) { TryLogLateRequest(roundId, CcjRoundPhase.OutputRegistration); return(Conflict($"Output registration can only be done from OutputRegistration phase. Current phase: {phase}.")); } if (request.OutputAddress.Network != Network) { // RegTest and TestNet address formats are sometimes the same. if (Network == Network.Main) { return(BadRequest($"Invalid OutputAddress Network.")); } } if (request.OutputAddress == Constants.GetCoordinatorAddress(Network)) { Logger.LogWarning($"Bob is registering the coordinator's address. Address: {request.OutputAddress}, Level: {request.Level}, Signature: {request.UnblindedSignature}."); } if (request.Level > round.MixingLevels.GetMaxLevel()) { return(BadRequest($"Invalid mixing level is provided. Provided: {request.Level}. Maximum: {round.MixingLevels.GetMaxLevel()}.")); } if (round.ContainsRegisteredUnblindedSignature(request.UnblindedSignature)) { return(NoContent()); } MixingLevel mixinglevel = round.MixingLevels.GetLevel(request.Level); Signer signer = mixinglevel.Signer; if (signer.VerifyUnblindedSignature(request.UnblindedSignature, request.OutputAddress.ScriptPubKey.ToBytes())) { using (await OutputLock.LockAsync()) { Bob bob = null; try { bob = new Bob(request.OutputAddress, mixinglevel); round.AddBob(bob); round.AddRegisteredUnblindedSignature(request.UnblindedSignature); } catch (Exception ex) { return(BadRequest($"Invalid outputAddress is provided. Details: {ex.Message}")); } int bobCount = round.CountBobs(); int blindSigCount = round.CountBlindSignatures(); if (bobCount == blindSigCount) // If there'll be more bobs, then round failed. Someone may broke the crypto. { await round.ExecuteNextPhaseAsync(CcjRoundPhase.Signing); } } return(NoContent()); } return(BadRequest("Invalid signature provided.")); }
public void Statement_containing_question_mark() { Assert.Equal("Whatever.", Bob.Response("Ending with ? means a question.")); }
public void Shouting_with_special_characters() { Assert.Equal("Whoa, chill out!", Bob.Response("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!")); }
public void No_letters() { Assert.Equal("Whatever.", Bob.Response("1, 2, 3")); }
public void Stating_something() { Assert.Equal("Whatever.", Bob.Response("Tom-ay-to, tom-aaaah-to.")); }
public void Using_acronyms_in_regular_speech() { Assert.Equal("Whatever.", Bob.Response("It's OK if you don't want to go to the DMV.")); }
public void DeepClone_ComplicatedMultiInterfaceInheritance(TypeModel model) { var bob = new Bob(); var clone = (Bob)model.DeepClone(bob); }
public void Asking_a_question() { Assert.Equal("Sure.", Bob.Response("Does this cryogenic chamber make me look fat?")); }
public async Task <IActionResult> PostOutputAsync([FromQuery] string roundHash, [FromBody] OutputRequest request) { if (string.IsNullOrWhiteSpace(roundHash) || request is null || string.IsNullOrWhiteSpace(request.OutputAddress) || string.IsNullOrWhiteSpace(request.SignatureHex) || !ModelState.IsValid) { return(BadRequest()); } CcjRound round = Coordinator.TryGetRound(roundHash); if (round is null) { return(NotFound("Round not found.")); } if (round.Status != CcjRoundStatus.Running) { return(Gone("Round is not running.")); } CcjRoundPhase phase = round.Phase; if (phase != CcjRoundPhase.OutputRegistration) { return(Conflict($"Output registration can only be done from OutputRegistration phase. Current phase: {phase}.")); } BitcoinAddress outputAddress; try { outputAddress = BitcoinAddress.Create(request.OutputAddress, Network); } catch (FormatException ex) { return(BadRequest($"Invalid OutputAddress. Details: {ex.Message}")); } if (RsaKey.PubKey.Verify(ByteHelpers.FromHex(request.SignatureHex), outputAddress.ScriptPubKey.ToBytes())) { using (await OutputLock.LockAsync()) { Bob bob = null; try { bob = new Bob(outputAddress); round.AddBob(bob); } catch (Exception ex) { return(BadRequest($"Invalid outputAddress is provided. Details: {ex.Message}")); } if (round.CountBobs() == round.AnonymitySet) { await round.ExecuteNextPhaseAsync(CcjRoundPhase.Signing); } } return(NoContent()); } return(BadRequest("Invalid signature provided.")); }
public void Question_with_only_numbers() { Assert.Equal("Sure.", Bob.Response("4?")); }
public void Only_numbers() { Assert.Equal("Whatever.", Bob.Response("1, 2, 3")); }
public void Forceful_question() { Assert.Equal("Whoa, chill out!", Bob.Response("WHAT THE HELL WERE YOU THINKING?")); }
public void Forceful_question() { Assert.Equal("Calm down, I know what I'm doing!", Bob.Response("WHAT'S GOING ON?")); }
public void Asking_gibberish() { Assert.Equal("Sure.", Bob.Response("fffbbcbeab?")); }
public void Prattling_on() { Assert.Equal("Sure.", Bob.Response("Wait! Hang on. Are you going to be OK?")); }
void Awake() { fader = transform.parent.GetComponent<Fading>(); bob = bobGO.GetComponent<Bob>(); }
public void Asking_a_numeric_question() { Assert.Equal("Sure.", Bob.Response("You are, what, like 15?")); }
public void Prolonged_silence() { Assert.Equal("Fine. Be that way!", Bob.Response(" ")); }
public void Talking_forcefully() { Assert.Equal("Whatever.", Bob.Response("Let's go make out behind the gym!")); }
public void Shouting() { Assert.Equal("Whoa, chill out!", Bob.Response("WATCH OUT!")); }
public void Forceful_question() { Assert.Equal("Calm down, I know what I'm doing!", Bob.Response("WHAT THE HELL WERE YOU THINKING?")); }
public void Alternate_silence() { Assert.Equal("Fine. Be that way!", Bob.Response("\t\t\t\t\t\t\t\t\t\t")); }
public void Shouting_numbers() { Assert.Equal("Whoa, chill out!", Bob.Response("1, 2, 3 GO!")); }
public void Multiple_line_question() { Assert.Equal("Whatever.", Bob.Response("\nDoes this cryogenic chamber make me look fat?\nNo.")); }
public void Question_with_no_letters() { Assert.Equal("Sure.", Bob.Response("4?")); }
public void Starting_with_whitespace() { Assert.Equal("Whatever.", Bob.Response(" hmmmmmmm...")); }
public void Shouting_with_no_exclamation_mark() { Assert.Equal("Whoa, chill out!", Bob.Response("I HATE THE DMV")); }
public void Ending_with_whitespace() { Assert.Equal("Sure.", Bob.Response("Okay if like my spacebar quite a bit? ")); }
public void Non_letters_with_question() { Assert.Equal("Sure.", Bob.Response(":) ?")); }
public void Other_whitespace() { Assert.Equal("Fine. Be that way!", Bob.Response("\n\r \t")); }
void Awake() { fader = transform.parent.GetComponent<Fading>(); bob = GameObject.Find("Bob").GetComponent<Bob>(); }
public void Non_question_ending_with_whitespace() { Assert.Equal("Whatever.", Bob.Response("This is a statement ending with whitespace ")); }
public void Shouting_gibberish() { Assert.Equal("Whoa, chill out!", Bob.Response("FCECDFCAAB")); }
public EditBob(Bob target) : base(target) { }