public KeyValuePair <object, Continue> Eval(Env e, Continue k) { return(RightNode.Eval(e, v => { GlobalEnv.Instance()[Index] = v; return k(null); })); }
private void ButtonBack_Click(object sender, RoutedEventArgs e) { Game.Visibility = Visibility.Hidden; StackMenu.Visibility = Visibility.Visible; Rating.CheckRating(Board.Score, Player.Text); Continue.WriteOnFile(Board.Letters, Board.Size); }
private void LoadWordGuess() { GuessLbl.Text = ""; bool complete = true; foreach (char letter in Word) { if (Guesses.Contains(letter)) { GuessLbl.Text += letter; } else { GuessLbl.Text += '_'; complete = false; } GuessLbl.Text += ' '; } if (complete) { SeqNo++; TotalScore += SeqNo <= 4 ? 5 : SeqNo <= 8 ? 10 : 20; Score.Text = "Score: " + TotalScore; if (TotalScore > Hiscore) { Hiscore = TotalScore; HighScore.Text = "High Score : " + Hiscore; } TextToSpeech(); TimeKeeper.Stop(); RemoveControls(ControlList); ShowElements(new Control[] { Listen, Continue }); Continue.Focus(); } }
void UpdateState() { Add.RaiseCanExecuteChanged(); Remove.RaiseCanExecuteChanged(); Continue.RaiseCanExecuteChanged(); Edit.RaiseCanExecuteChanged(); }
public KeyValuePair <object, Continue> Eval(Env e, Continue k) { return(RightNode.Eval(e, v => { e[Index] = v; return k(null); })); }
// Start is called before the first frame update void Awake() { //initialises variables if its the first time running and GlobalController hasn't been used yet playerHealth = 100; playerMaxHealth = 100; gold = 0; attackDamage = 10; critDamage = 30; critChance = 0.2f; upgradeCounter = 1; //Check if ContinueGlobalSave has been passed through from the main menu. //This stops errors if there is not one if (GameObject.Find("ContinueGlobalSave")) { continueScript = GameObject.Find("ContinueGlobalSave").GetComponent <Continue>(); } //Finds components needed GM = GameObject.Find("-GM"); animator = GetComponent <Animator>(); PlayerRB = this.gameObject.GetComponent <Rigidbody2D>(); //For when the player dies. animator.SetBool("IsAlive", true); LoadFromGlobal(); this.transform.position = currentSpawnPoint; ActivateTrees(); }
public void InputControls() { try { var logInData = logInType.GetSingleData(); var logInListData = logInType.GetMultipleData(); Expression <Func <LogIn, string> > passwordExpr = login => login.Password; Expression <Func <LogIn, string> > userNameExpr = login => login.UserName; var filteredEntity = logInType.SetEntityField <string>(passwordExpr, TestDataConstants.PASSWORD); var filteredEntities = logInType.SetEntityFields <string>(userNameExpr, TestDataConstants.USERNAMES); FirstName.SendKeys("Unisys123"); LastName.SendKeys("4356"); Email.SendKeys("MyAutomation43567"); Password.SendKeys("1efficient#"); SelectElement selector = new SelectElement(Code); selector.SelectByValue("IN"); Phone.SendKeys("9886328047"); Month.Click(); Day.SendKeys("22"); Year.SendKeys("1987"); Gender.SendKeys("Male"); Continue.Click(); SendCode.Click(); } catch (Exception ex) { throw; } }
private void LateUpdate() { var tileUnderMouse = GetTileUnderMouse(); if (Input.GetKeyDown(MoveKey)) { SetCurrentActionToMove.InvokeSafe(); } if (Input.GetKeyDown(PrimaryAttackKey)) { SetCurrentActionToAttack.InvokeSafe(); } if (Input.GetKeyDown(ContinueKey)) { Continue.InvokeSafe(); } if (Input.GetKeyDown(UndoKey)) { Undo.InvokeSafe(); } if (tileUnderMouse != null) { if (Input.GetKeyDown(SpawnDefaultUnitKey)) { SpawnDefaultUnit.InvokeSafe(tileUnderMouse); } if (Input.GetKeyDown(PreviewKey)) { PreviewAction?.Invoke(tileUnderMouse); } if (Input.GetMouseButtonDown(0)) { Select.InvokeSafe(tileUnderMouse); } if (Input.GetMouseButtonDown(1)) { CommitCurrentAction.InvokeSafe(tileUnderMouse); } if (Input.GetKeyDown(KeyCode.K)) { Kill?.Invoke(tileUnderMouse); } } if (tileUnderMouse != _lastTileUnderMouse) { HoveredTileChanged?.Invoke(tileUnderMouse); } _lastTileUnderMouse = tileUnderMouse; }
public KeyValuePair <object, Continue> Eval(Env e, Continue k) { for (int i = 0; i < EnvIndex; ++i) { e = e.PrevEnv; } return(k(e[Index])); }
public KeyValuePair <object, Continue> Eval(Env e, Continue k) { return(ProcedureNode.Eval(e, p => { return EvalList(e, ActualNodes, 0, ActualNodes.ToList <object>(), 0, actuals => { return ((Procedure)p)((List <object>)actuals, k); }); })); }
//----------------------------------------------------------- public Type Visit(Continue node) { if (node.HasChildren()) { VisitLabel((Label)node[0]); } return(Type.VOID); }
private void p2_Click(object sender, EventArgs e) { Panel p = (Panel)sender; bool ok = false; for (int i = 0; i < p.Controls.Count; i++) { if (p.Controls[i].Name.Substring(0, 1) == "l") { if (p.Controls[i].Text == searchmaths.SearchProp.rep) { ok = true; p.BackColor = Color.Green; } } } if (p1 != p) { p1.BackColor = Color.DimGray; l1.Text = ""; } if (p2 != p) { p2.BackColor = Color.DimGray; l2.Text = ""; } if (p3 != p) { p3.BackColor = Color.DimGray; l3.Text = ""; } if (p4 != p) { p4.BackColor = Color.DimGray; l4.Text = ""; } counter++; if (ok == true) { correct++; } else { p.BackColor = Color.Red; } if ((counter == 5) && (correct > 2)) { pTermineniv.Show(); pTermineniv.BringToFront(); if (searchmaths.SearchProp.niveau == "1") { lniv1termine.Show(); Continue.Show(); Continue.Text = "Niveau2"; } else if (searchmaths.SearchProp.niveau == "2") { lniv1termine.Hide(); lniv2termine.Show(); Continue.Hide(); } } else { Suivant.Show(); } }
private void ButtonContinue_Click(object sender, RoutedEventArgs e) { char[,] board = Continue.StartContinue(); if (Continue.CheckFile()) { Board.Letters = Continue.StartContinue(); } ButtonStart_Click(sender, e); }
/// <summary> /// When the pause menu is deactivated, it'll fade/translate the interface off-screen. /// </summary> public void Deactivate() { ClearTransformations(); Background.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 1, 0, 400)); Continue.MoveToX(-Continue.Width, Easing.OutExpo, 400); Retry.MoveToX(-Retry.Width, Easing.OutExpo, 400); Quit.MoveToX(-Quit.Width, Easing.OutExpo, 400); }
/// <summary> /// When the pause menu is activated, it'll fade/translate the interface on-screen. /// </summary> public void Activate() { ClearTransformations(); Background.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 400)); Continue.MoveToX(GetActivePosX(Continue), Easing.OutExpo, 400); Retry.MoveToX(GetActivePosX(Retry), Easing.OutExpo, 400); Quit.MoveToX(GetActivePosX(Quit), Easing.OutExpo, 400); }
protected override object VisitContinue(Continue C) { if (loops.Empty()) { throw new InvalidOperationException("Continue outside of loop."); } target.Add(loops.Peek().Continue); return(null); }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Escape) { Continue.PerformClick(); return(true); } return(base.ProcessCmdKey(ref msg, keyData)); }
private async void Continue_Tapped(object sender, EventArgs e) { await Continue.ScaleTo(.95); Loading.IsVisible = true; await Continue.ScaleTo(1); Navigation.PushAsync(new SelectCategories()); Loading.IsVisible = false; }
/// <summary> /// ゲーム コンポーネントが自身を更新するためのメソッドです。 /// </summary> /// <param name="gameTime">ゲームの瞬間的なタイミング情報</param> public override void Update(GameTime gameTime) { // TODO: ここにアップデートのコードを追加します。 this.mouseState = Mouse.GetState(); Play.txtUpdate(mouseState); Continue.txtUpdate(mouseState); Option.txtUpdate(mouseState); Exit.txtUpdate(mouseState); base.Update(gameTime); }
public Node StmtContinue() { var statementContinue = new Continue() { AnchorToken = Expect(TokenCategory.CONTINUE) }; Expect(TokenCategory.SEMICOLON); return(statementContinue); }
private async void Continue_Tapped(object sender, EventArgs e) { await Continue.ScaleTo(.95); Loading.IsVisible = true; await Continue.ScaleTo(1); Navigation.PushAsync(new UserChoice.SetPhysique()); Loading.IsVisible = false; }
public void Restart() { Enemies = GameObject.FindGameObjectsWithTag("Enemy"); for (int i = 0; i < Enemies.Length; i++) { Destroy(Enemies [i]); } Money = GameObject.FindGameObjectsWithTag("Money"); for (int i = 0; i < Money.Length; i++) { Destroy(Money [i]); } GameObject[] Spawnholes = GameObject.FindGameObjectsWithTag("Spawnhole"); for (int i = 0; i < Spawnholes.Length; i++) { Destroy(Spawnholes [i]); } EnemySpawnScene = GameObject.FindGameObjectWithTag("EnemySpawn"); Destroy(EnemySpawnScene); Instantiate(EnemySpawn); GameObject boss = GameObject.FindGameObjectWithTag("quack"); Destroy(boss); Instantiate(Bossspawn); if (playeracc.activeSelf == false) { playeracc.SetActive(true); } else { playeracc.transform.position = new Vector2(0, 0); playeracc.GetComponent <OtherMove> ().enabled = true; } //OtherMove playscript = playeracc.GetComponent<OtherMove> (); //playscript.canmove = true; Destroy(Instr1); Destroy(Instr2); Restartbutton.SetActive(false); Menubutton.SetActive(false); Deadtext.SetActive(false); highsc.SetActive(false); Restartpause.SetActive(false); Continue.SetActive(false); //camtrans.transform.rotation = Quaternion.Euler(0, 0, 0); //cam.GetComponent<Camera> ().orthographicSize = 5; Time.timeScale = 1; UI scorescript = UIop.GetComponent <UI> (); scoreacc = 0; score1 = 0; timedisp = scoreacc.ToString(); scorereset = true; playeracc.GetComponent <AudioSource>().Play(); }
public KeyValuePair <object, Continue> Eval(Env e, Continue k) { return(k((Procedure)((actuals, k2) => { Env newEnv = new Env(e, LocalVarCount); for (int i = 0; i < actuals.Count; ++i) { newEnv[i] = actuals[i]; } return BodyNode.Eval(newEnv, k2); }))); }
public KeyValuePair <object, Continue> Eval(Env e, Continue k) { return(RightNode.Eval(e, v => { for (int i = 0; i < EnvIndex; ++i) { e = e.PrevEnv; } e[Index] = v; return k(null); })); }
/// <summary>1 /// ゲーム コンポーネントが自身を描画するためのメソッドです。 /// </summary> /// <param name="gameTime">ゲームの瞬間的なタイミング情報</param> public override void Draw(GameTime gameTime) { spriteBatch.Begin(); this.spriteBatch.Draw(TmousePointer, new Rectangle(mouseState.X, mouseState.Y, TmousePointer.Width, TmousePointer.Height), Color.Beige); this.spriteBatch.DrawString(Play.GetStateFont(), Play.txt, Play.pos, Color.Black); this.spriteBatch.DrawString(Continue.GetStateFont(), Continue.txt, Continue.pos, Color.Black); this.spriteBatch.DrawString(Option.GetStateFont(), Option.txt, Option.pos, Color.Black); this.spriteBatch.DrawString(Exit.GetStateFont(), Exit.txt, Exit.pos, Color.Black); spriteBatch.End(); base.Draw(gameTime); }
private async Task OnContinue(Continue x, CancellationToken ct) { System.Diagnostics.Debug.WriteLine("OnContinue " + Thread.CurrentThread.ManagedThreadId); System.Diagnostics.Debug.WriteLine($"continued : {string.Join(", ", x.Players.Select(p => p.Id))}"); generalMessage.Visibility = Visibility.Visible; generalMessage.Text = $"プレイヤー{string.Join(", ", x.Players.Select(p => p.Id))}がコンティニューしました"; await Task.Delay(1000); generalMessage.Text = ""; generalMessage.Visibility = Visibility.Collapsed; }
// Handle Input public override void HandleInput() { if (InputManager.IsActionPressed(InputManager.Action.Ok) && IsActive) { // Raise the accepted event, then exit the message box. Continue?.Invoke(this, EventArgs.Empty); AudioManager.PlayCue("closeWindow"); ExitScreen(); } }
//This destroys any other instances of the class so theres only ever one void Awake() { if (Instance == null) { DontDestroyOnLoad(gameObject); Instance = this; } else if (Instance != this) { Destroy(gameObject); } }
public void MixTest() { var expr = Repeat.Create(Sequence.Create(first, Continue.Create(second), (a, b) => ""), list => list.Count); var parser = Parser.Create(expr); { Assert.IsTrue(parser.Parse("123456123456", out var ret, out var exceptions, out _)); Assert.AreEqual(ret, 2); } { Assert.IsFalse(parser.Parse("123123456", out _, out var exceptions, out _)); Assert.AreEqual(exceptions.Count, 1); } }
/// <summary> /// Metoda RefreshMenu obnovuje Form1 a zobrazí tlačítko "Pokračovat", pokud zjistí přítomnost uložené hry. /// </summary> public void RefreshMenu() { if (File.Exists("./lehka/pokracovani.txt")) { AlreadyLoaded = false; Continue.Show(); Continue.Click += new EventHandler(Continue_Click); } else { Continue.Hide(); } }
void case_971() #line 6468 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); }
protected internal override void TraverseContinue(Continue @continue) { Dispatch(@continue); }
public virtual void VisitContinue(Continue Continue) { }
public override void VisitContinue(Continue p) { IL.Emit(OpCodes.Br, ContinueLabels.Peek()); }
public virtual Statement VisitContinue(Continue Continue, Continue changes, Continue deletions, Continue insertions){ this.UpdateSourceContext(Continue, changes); if (Continue == null) return changes; if (changes != null){ if (deletions == null || insertions == null) Debug.Assert(false); else{ Continue.Level = changes.Level; } }else if (deletions != null) return null; return Continue; }
public override object Visit (Continue continueStatement) { var result = new ContinueStatement (); var location = LocationsBag.GetLocations (continueStatement); result.AddChild (new CSharpTokenNode (Convert (continueStatement.loc), ContinueStatement.ContinueKeywordRole), ContinueStatement.ContinueKeywordRole); if (location != null) result.AddChild (new CSharpTokenNode (Convert (location [0]), Roles.Semicolon), Roles.Semicolon); return result; }
static KeyValuePair<object, Continue> Eval(Env env, object exp, Continue k) { if (exp is string) { return k(env.Lookup((string)exp)); } else if (!(exp is List<object>)) { return k(exp); } List<object> l = (List<object>)exp; switch (l[0] as string) { case "quote": return k(ListExpToPairExp(l[1])); case "if": return Eval(env, l[1], (b => { if ((bool)b) return Eval(env, l[2], k); else return Eval(env, l[3], k); })); case "lambda": return k(MakeScriptProcedure(env, (List<object>)l[1], 0, l, 2)); case "begin": return EvalSequentially(env, l, 1, k); case "cond": if (l.Count == 2) { return EvalSequentially(env, (List<object>)l[1], 0, k); } else { List<object> caseExps = (List<object>)l[1]; List<object> newExp = new List<object>() { "if", caseExps[0], new List<object>(){"begin"}.Concat(caseExps.Skip(1)).ToList(), new List<object>(){"cond"}.Concat(l.Skip(2)).ToList(), }; return Eval(env, newExp, k); } case "define": if (l[1] is string) { return Eval(env, l[2], (v => { env.Define((string)l[1], v); return k(null); })); } else { env.Define((string)((List<object>)l[1])[0], MakeScriptProcedure(env, (List<object>)l[1], 1, l, 2)); return k(null); } case "set!": return Eval(env, l[2], (v => { env.Set((string)l[1], v); return k(null); })); case "let": { List<object> nameValues = (List<object>)l[1]; var names = nameValues.Select(a => ((List<object>)a)[0]); var values = nameValues.Select(a => ((List<object>)a)[1]); List<object> lambda = new List<object> { "lambda", names.ToList() }.Concat(l.Skip(2)).ToList(); List<object> newExp = new List<object> { lambda }.Concat(values).ToList(); return Eval(env, newExp, k); } default: { return Eval(env, l[0], (p => { return EvalList(env, l, 1, l.Skip(1).ToList(), 0, (actuals => { return ((Procedure)p)((List<object>)actuals, k); })); })); } } }
protected internal override void TraverseContinue(Continue @continue) { _writer.Write("continue"); }
static KeyValuePair<object, Continue> EvalList(Env env, List<object> exps, int expIdx, List<object> result, int ridx, Continue k) { if (expIdx == exps.Count) { return new KeyValuePair<object, Continue>(result, k); } else { return Eval(env, exps[expIdx], (v => { result[ridx] = v; return EvalList(env, exps, expIdx + 1, result, ridx + 1, k); })); } }
public override Statement VisitContinue(Continue Continue) { if (Continue == null) return null; int level = Continue.Level != null ? (int)Continue.Level.Value : 1; if (level < 0 || level > this.loopCount) { this.HandleError(Continue, Error.BadExitOrContinue); return null; } return Continue; }
public override Statement VisitContinue(Continue Continue){ if (Continue == null) return null; int level = Continue.Level != null ? (int)Continue.Level.Value : 0; int n = this.continueTargets.Count; bool leavesExceptionBlock = false; while (level >= 0 && n > 0){ Statement et = this.continueTargets[--n]; switch(et.NodeType){ case NodeType.Block: if (level-- == 0 || n == 0){ Branch b = new Branch(null, (Block)et, false, false, leavesExceptionBlock); b.SourceContext = Continue.SourceContext; return b; } break; case NodeType.Try: leavesExceptionBlock = true; break; case NodeType.Finally: //Should not happen if Checker did its job n = 0; break; } } return new Statement(NodeType.Nop); //TODO: replace with throw }
public KeyValuePair<object, Continue> Eval(Env e, Continue k) { return RightNode.Eval(e, v => { e[Index] = v; return k(null); }); }
public KeyValuePair<object, Continue> Eval(Env e, Continue k) { return RightNode.Eval(e, v=>{ GlobalEnv.Instance()[Index] = v; return k(null); }); }
public KeyValuePair<object, Continue> Eval(Env e, Continue k) { return RightNode.Eval(e, v => { for (int i = 0; i < EnvIndex; ++i) { e = e.PrevEnv; } e[Index] = v; return k(null); }); }
protected internal override Node TransformContinue(Continue @continue) { return Dispatch(@continue); }
protected internal virtual void TraverseContinue(Continue @continue) { @continue.Unsupported(); }
void case_972() #line 6473 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); }
public KeyValuePair<object, Continue> Eval(Env e, Continue k) { return k(Value); }
public virtual Statement VisitContinue(Continue Continue){ return Continue; }
public KeyValuePair<object, Continue> Eval(Env e, Continue k) { return k((Procedure)((actuals, k2)=>{ Env newEnv = new Env(e, LocalVarCount); for (int i = 0; i < actuals.Count; ++i) newEnv[i] = actuals[i]; return BodyNode.Eval(newEnv, k2); })); }
//================================================================= static KeyValuePair<object, Continue> EvalSequentially(Env env, List<object> exps, int expIdx, Continue k) { if (expIdx == exps.Count - 1) { return Eval(env, exps[expIdx], k); } else { return Eval(env, exps[expIdx], (_ => EvalSequentially(env, exps, expIdx + 1, k))); } }
public virtual Statement VisitContinue(Continue Continue1, Continue Continue2) { return Continue1; }
public virtual Differences VisitContinue(Continue continue1, Continue continue2){ Differences differences = new Differences(continue1, continue2); if (continue1 == null || continue2 == null){ if (continue1 != continue2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++; return differences; } Continue changes = (Continue)continue2.Clone(); Continue deletions = (Continue)continue2.Clone(); Continue insertions = (Continue)continue2.Clone(); differences.NumberOfSimilarities++; if (continue1.Level == continue2.Level) differences.NumberOfSimilarities++; else differences.NumberOfDifferences++; if (differences.NumberOfDifferences == 0){ differences.Changes = null; differences.Deletions = null; differences.Insertions = null; }else{ differences.Changes = changes; differences.Deletions = deletions; differences.Insertions = insertions; } return differences; }
public override Statement VisitContinue(Continue Continue) { if (Continue == null) return null; return base.VisitContinue((Continue)Continue.Clone()); }
internal static stmt Convert(Statement stmt) { stmt ast; if (stmt is FunctionDefinition) ast = new FunctionDef((FunctionDefinition)stmt); else if (stmt is ReturnStatement) ast = new Return((ReturnStatement)stmt); else if (stmt is AssignmentStatement) ast = new Assign((AssignmentStatement)stmt); else if (stmt is AugmentedAssignStatement) ast = new AugAssign((AugmentedAssignStatement)stmt); else if (stmt is DelStatement) ast = new Delete((DelStatement)stmt); else if (stmt is PrintStatement) ast = new Print((PrintStatement)stmt); else if (stmt is ExpressionStatement) ast = new Expr((ExpressionStatement)stmt); else if (stmt is ForStatement) ast = new For((ForStatement)stmt); else if (stmt is WhileStatement) ast = new While((WhileStatement)stmt); else if (stmt is IfStatement) ast = new If((IfStatement)stmt); else if (stmt is WithStatement) ast = new With((WithStatement)stmt); else if (stmt is RaiseStatement) ast = new Raise((RaiseStatement)stmt); else if (stmt is TryStatement) ast = Convert((TryStatement)stmt); else if (stmt is AssertStatement) ast = new Assert((AssertStatement)stmt); else if (stmt is ImportStatement) ast = new Import((ImportStatement)stmt); else if (stmt is FromImportStatement) ast = new ImportFrom((FromImportStatement)stmt); else if (stmt is ExecStatement) ast = new Exec((ExecStatement)stmt); else if (stmt is GlobalStatement) ast = new Global((GlobalStatement)stmt); else if (stmt is ClassDefinition) ast = new ClassDef((ClassDefinition)stmt); else if (stmt is BreakStatement) ast = new Break(); else if (stmt is ContinueStatement) ast = new Continue(); else if (stmt is EmptyStatement) ast = new Pass(); else throw new ArgumentTypeException("Unexpected statement type: " + stmt.GetType()); ast.GetSourceLocation(stmt); return ast; }
public virtual object Visit (Continue continueStatement) { return null; }
public KeyValuePair<object, Continue> Eval(Env e, Continue k) { return PredNode.Eval(e, b => { if ((bool)b) return ThenNode.Eval(e, k); else return ElseNode.Eval(e, k); }); }
public override Statement VisitContinue(Continue Continue) { throw new ApplicationException("unimplemented"); }
protected internal override void TraverseContinue(Continue @continue) { Types.Add(@continue, null); }
protected override void TraverseContinue(Continue @continue) { var loop = @continue.Parents().OfType<Loop>().AssertFirst(); il.br(continues[loop]); }