public Game(string title, int year, GameStyle style) { this.title = ""; this.year = 0; this.style = (GameStyle)0; this.Title = title; this.Year = year; this.Style = style; }
public Footballer(string name, string surname, IFindCountry.Country country, GameStyle gameStyle, int agility, int stamina, int speed, int strength) : base(name, surname, country) { Style = gameStyle; _agility = agility; _stamina = stamina; _speed = speed; _strength = strength; }
public Footballer(string name, string surname, int weight, int height, Gender gender, DateTime dateOfBirth, GameStyle gameStyle) : base(name, surname, dateOfBirth, gender, weight, height) { Random rand = new Random(); _agility = rand.Next(80, 90); _stamina = rand.Next(70, 80); _speed = rand.Next(60, 70); _strength = rand.Next(20, 30); Style = gameStyle; }
protected Game(GameStyle style, Board copyFrom, Color nextTurn) : this() { Style = style; switch (style) { case GameStyle.Traditional: Board = new Board(this); CopyBoard(copyFrom); CurrentTurn = nextTurn; break; default: throw new ArgumentOutOfRangeException(nameof(style), style, null); } }
public Game(GameStyle style) : this() { Style = style; switch (style) { case GameStyle.Traditional: Board = new Board(this); PlaceTraditionalPieces(Board); CurrentTurn = Color.White; break; default: throw new ArgumentOutOfRangeException(nameof(style), style, null); } }
private ScreenManager() { Dimensions = new Vector2(1280, 800); // Set screen resolution Image = new Image(0f); Image.Path = "ScreenManager/BlackOverlay"; // what the overlay image will be 1x1px Image.Scale = new Vector2(Dimensions.X, Dimensions.Y); // the size of the overlay will be scaled by the size of the screen. Image.Effects = "FadeEffect"; // add the fade effect to the image gameStyle = GameStyle.TopDown; showFPS = false; backgroundColor = Color.Black; currentScreen = new SplashScreen(); // starting screen }
public MainPage() { InitializeComponent(); UpperLeft.okToPlaceDot += OkToPlaceDotCallback; UpperRight.okToPlaceDot += OkToPlaceDotCallback; LowerLeft.okToPlaceDot += OkToPlaceDotCallback; LowerRight.okToPlaceDot += OkToPlaceDotCallback; UpperLeft.getColorForDot += GetColorCallback; UpperRight.getColorForDot += GetColorCallback; LowerLeft.getColorForDot += GetColorCallback; LowerRight.getColorForDot += GetColorCallback; UpperLeft.okToRotateQuadrant += OkToRotateQuadrantCallback; UpperRight.okToRotateQuadrant += OkToRotateQuadrantCallback; LowerLeft.okToRotateQuadrant += OkToRotateQuadrantCallback; LowerRight.okToRotateQuadrant += OkToRotateQuadrantCallback; UpperLeft.notifyDotPlaced += DotPlacedCallback; UpperRight.notifyDotPlaced += DotPlacedCallback; LowerLeft.notifyDotPlaced += DotPlacedCallback; LowerRight.notifyDotPlaced += DotPlacedCallback; UpperLeft.notifyQuadrantRotated += QuadrantRotatedCallback; UpperRight.notifyQuadrantRotated += QuadrantRotatedCallback; LowerLeft.notifyQuadrantRotated += QuadrantRotatedCallback; LowerRight.notifyQuadrantRotated += QuadrantRotatedCallback; aiBackGround.DoWork += new DoWorkEventHandler(aiBackGround_DoWork); aiBackGround.RunWorkerCompleted += new RunWorkerCompletedEventHandler(aiBackGround_RunWorkerCompleted); ApplicationBarMenuItem settingsItem = new ApplicationBarMenuItem(); settingsItem.Text = "Settings"; settingsItem.IsEnabled = true; settingsItem.Click += SettingsButton_Click; ApplicationBar.MenuItems.Add(settingsItem); SetColorTheme(settings.ColorThemeSetting, true); this.currentGameStyle = settings.GameStyleSetting; }
public virtual string StartRender(string dirname, GameStyle gameStyle) { switch (gameStyle) { case GameStyle.Normal: return(StartRenderNormal(dirname)); case GameStyle.NoRepeat: return(StartRenderNoRepeat(dirname)); case GameStyle.NoRepeatNearest: return(StartRenderNoRepeatNearest(dirname)); case GameStyle.VaryRatio: return(StartRenderVaryRatio(dirname)); case GameStyle.WithAngle: return(StartRenderWithAngle(dirname)); } return(StartRenderNormal(dirname)); }
public void Start() { ClearData(); //this.level = Game.GetLevel(); this.level = GameLevel.Standart; this.CellCount = (int)level * (int)level; this.style = Game.GetGameStyle(); for (int i = 0; i < CellCount; i++) { CellControl cc = new CellControl(i, this, ImageBalls.None); cellCollection.Add(cc); } SetDefault(); }
private void NewGameButton_Click(object sender, EventArgs e) { // ignore new game requests if the ai is running if (aiThinking) { return; } okToRotateQuadrant = false; okToClickDots = false; UpperLeft.Reset(); UpperRight.Reset(); LowerLeft.Reset(); LowerRight.Reset(); PopupPanel.Visibility = System.Windows.Visibility.Collapsed; masterBoard = new Board(); this.currentGameStyle = settings.GameStyleSetting; if (this.currentGameStyle == GameStyle.VsAi && settings.PlayerColorSetting == PieceColor.Black) { playerColor = PieceColor.Black; if (0 == settings.AiStrengthSetting) { Debug.Assert(false, "Easy"); masterAI = new FixedDepthPlayer(PieceColor.White, 0); } else if (1 == settings.AiStrengthSetting) { Debug.Assert(false, "Med"); masterAI = new FixedDepthPlayer(PieceColor.White, 2); } else { Debug.Assert(false, "Hard"); masterAI = new FixedTimePlayer(PieceColor.White, 5); } aiThinking = true; DoAiMove(); } else if (this.currentGameStyle == GameStyle.VsAi && settings.PlayerColorSetting == PieceColor.White) { playerColor = PieceColor.White; if (0 == settings.AiStrengthSetting) { masterAI = new FixedDepthPlayer(PieceColor.Black, 0); } else if (1 == settings.AiStrengthSetting) { masterAI = new FixedDepthPlayer(PieceColor.Black, 2); } else { masterAI = new FixedTimePlayer(PieceColor.Black, 5); } okToClickDots = true; okToRotateQuadrant = false; BottomText.Text = "your move"; } else if (this.currentGameStyle == GameStyle.VsHuman) { playerColor = PieceColor.White; okToClickDots = true; okToRotateQuadrant = false; BottomText.Text = "white's move"; } }
// Use this for initialization void Start() { currentGameStyle = GameStyle.running; }
private void NewGameButton_Click(object sender, EventArgs e) { // ignore new game requests if the ai is running if (aiThinking) return; okToRotateQuadrant = false; okToClickDots = false; UpperLeft.Reset(); UpperRight.Reset(); LowerLeft.Reset(); LowerRight.Reset(); PopupPanel.Visibility = System.Windows.Visibility.Collapsed; masterBoard = new Board(); this.currentGameStyle = settings.GameStyleSetting; if (this.currentGameStyle == GameStyle.VsAi && settings.PlayerColorSetting == PieceColor.Black) { playerColor = PieceColor.Black; if (0 == settings.AiStrengthSetting) { Debug.Assert(false, "Easy"); masterAI = new FixedDepthPlayer(PieceColor.White, 0); } else if (1 == settings.AiStrengthSetting) { Debug.Assert(false, "Med"); masterAI = new FixedDepthPlayer(PieceColor.White, 2); } else { Debug.Assert(false, "Hard"); masterAI = new FixedTimePlayer(PieceColor.White, 5); } aiThinking = true; DoAiMove(); } else if (this.currentGameStyle == GameStyle.VsAi && settings.PlayerColorSetting == PieceColor.White) { playerColor = PieceColor.White; if (0 == settings.AiStrengthSetting) masterAI = new FixedDepthPlayer(PieceColor.Black, 0); else if (1 == settings.AiStrengthSetting) masterAI = new FixedDepthPlayer(PieceColor.Black, 2); else masterAI = new FixedTimePlayer(PieceColor.Black, 5); okToClickDots = true; okToRotateQuadrant = false; BottomText.Text = "your move"; } else if (this.currentGameStyle == GameStyle.VsHuman) { playerColor = PieceColor.White; okToClickDots = true; okToRotateQuadrant = false; BottomText.Text = "white's move"; } }
public GameFlowManager(GameStyle style = GameStyle.Base) { this.style = style; currentAge = Age.I; }
public virtual string StartRender(GameStyle gameStyle) { return(StartRender(ShapeName, gameStyle)); }