diff --git a/Snake/Fruit.cs b/Snake/Fruit.cs index f5c0ca7..1f03446 100644 --- a/Snake/Fruit.cs +++ b/Snake/Fruit.cs @@ -14,7 +14,8 @@ public class Fruit private int _X; // Position in X. private int _Y; // Position in Y. private const int _POINT = 5; // The points earned when item reached. - private const int _SIDE = 12; // Size of the panel side. + private int _SIDE; // Size of the panel side. + private Random _RandomNumber; // Random number. #endregion @@ -24,9 +25,10 @@ public class Fruit public Fruit(int width, int height) { - Random randomNumber = new Random(); // Initialize the generator of random. - _X = (_SIDE + 2) * (randomNumber.Next(width - _SIDE) / (_SIDE + 2)); // Set _X thanks to a generated number. - _Y = (_SIDE + 2) * (randomNumber.Next(height - _SIDE) / (_SIDE + 2)); // Set _Y thanks to another generated number. + _SIDE = width / 54 - 2; // Initialize dynamically the side of the fruit. + Random _RandomNumber = new Random(); // Initialize the generator of random. + _X = (_SIDE + 2) * (_RandomNumber.Next(width - _SIDE) / (_SIDE + 2)); // Set _X thanks to a generated number. + _Y = (_SIDE + 2) * (_RandomNumber.Next(height - _SIDE) / (_SIDE + 2)); // Set _Y thanks to another generated number. } #endregion @@ -53,9 +55,9 @@ public Boolean IsReached(SnakePart snake) public void MoveFruit(int width, int height, FullSnake fullSnake) { - Random randomNumber = new Random(); // Initialize the generator of random. - _X = (_SIDE + 2) * (randomNumber.Next(width - _SIDE) / (_SIDE + 2)); // Set _X thanks to a generated number. - _Y = (_SIDE + 2) * (randomNumber.Next(height - _SIDE) / (_SIDE + 2)); // Set _Y thanks to another generated number. + _RandomNumber = new Random(); // Générate a new random number. + _X = (_SIDE + 2) * (_RandomNumber.Next(width - _SIDE) / (_SIDE + 2)); // Set _X thanks to a generated number. + _Y = (_SIDE + 2) * (_RandomNumber.Next(height - _SIDE) / (_SIDE + 2)); // Set _Y thanks to another generated number. for (int i = 0; i < fullSnake.Get_SnakeSize(); i++) // Check each snake part. { diff --git a/Snake/FullSnake.cs b/Snake/FullSnake.cs index d9a6557..ae1a08a 100644 --- a/Snake/FullSnake.cs +++ b/Snake/FullSnake.cs @@ -20,12 +20,12 @@ public class FullSnake #region Constructor - public FullSnake() + public FullSnake(int width) { _Snake = new List(); // Instanciate the list of snake parts. - _Snake.Add(new SnakePart()); // Add one part (the first one) of the snake to the list. - AddSnakePart(); // Then add two others parts (the game start with a snake composed of three parts). - AddSnakePart(); // + _Snake.Add(new SnakePart(width)); // Add one part (the first one) of the snake to the list. + AddSnakePart(width); // Then add two others parts (the game start with a snake composed of three parts). + AddSnakePart(width); // } #endregion @@ -37,7 +37,7 @@ public FullSnake() /////////////////////////////////////// // Method which update snake movement - public void UpdateSnake(int direction, int width, int height) + public void UpdateSnake(int direction, int width) { int i = 0; @@ -46,14 +46,14 @@ public void UpdateSnake(int direction, int width, int height) // If the element of the snake is the first one, move it by the direction defined by the event KeyDown. if (element.Get_IsHead() == true) { - element.UpdateSnakePart(direction, width, height); + element.UpdateSnakePart(direction); i++; } // Else, if the element is not the head of the snake, move it by the last direction of the previous element. else if (element.Get_IsHead() == false) { - element.UpdateSnakePart(_Snake[i - 1].Get_LastDirection(), width, height); + element.UpdateSnakePart(_Snake[i - 1].Get_LastDirection()); i++; } } @@ -62,18 +62,18 @@ public void UpdateSnake(int direction, int width, int height) ///////////////////////////////////////////// // Method which add a part to the full snake - public void AddSnakePart() + public void AddSnakePart(int width) { int lastElementIndex = _Snake.Count - 1; // Compute the last element of the snake. if (_Snake[lastElementIndex].Get_Direction() == 0) // If the last element moves up... - _Snake.Add(new SnakePart(_Snake[lastElementIndex].Get_X(), _Snake[lastElementIndex].Get_Y() + (_Snake[lastElementIndex].Get_SIDE() + 2), 0)); // ...then add a part just down on it. + _Snake.Add(new SnakePart(_Snake[lastElementIndex].Get_X(), _Snake[lastElementIndex].Get_Y() + (_Snake[lastElementIndex].Get_SIDE() + 2), 0, width)); // ...then add a part just down on it. if (_Snake[lastElementIndex].Get_Direction() == 1) // If the last element moves right... - _Snake.Add(new SnakePart(_Snake[lastElementIndex].Get_X() - (_Snake[lastElementIndex].Get_SIDE() + 2), _Snake[lastElementIndex].Get_Y(), 1)); // ...then add a part just left on it. + _Snake.Add(new SnakePart(_Snake[lastElementIndex].Get_X() - (_Snake[lastElementIndex].Get_SIDE() + 2), _Snake[lastElementIndex].Get_Y(), 1, width)); // ...then add a part just left on it. if (_Snake[lastElementIndex].Get_Direction() == 2) // If the last element moves down... - _Snake.Add(new SnakePart(_Snake[lastElementIndex].Get_X(), _Snake[lastElementIndex].Get_Y() - (_Snake[lastElementIndex].Get_SIDE() + 2), 2)); // ...then add a part just up on it. + _Snake.Add(new SnakePart(_Snake[lastElementIndex].Get_X(), _Snake[lastElementIndex].Get_Y() - (_Snake[lastElementIndex].Get_SIDE() + 2), 2, width)); // ...then add a part just up on it. if (_Snake[lastElementIndex].Get_Direction() == 3) // If the last element moves left... - _Snake.Add(new SnakePart(_Snake[lastElementIndex].Get_X() + (_Snake[lastElementIndex].Get_SIDE() + 2), _Snake[lastElementIndex].Get_Y(), 3)); // ...then add a part just right on it. + _Snake.Add(new SnakePart(_Snake[lastElementIndex].Get_X() + (_Snake[lastElementIndex].Get_SIDE() + 2), _Snake[lastElementIndex].Get_Y(), 3, width)); // ...then add a part just right on it. } ////////////////////////////////////////////// diff --git a/Snake/Game.Designer.cs b/Snake/Game.Designer.cs index 79e8a2f..adc1403 100644 --- a/Snake/Game.Designer.cs +++ b/Snake/Game.Designer.cs @@ -1,5 +1,10 @@ using System.Windows.Forms; +using System; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Windows.Forms; + namespace Snake { partial class Game @@ -30,119 +35,165 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.myFont = new Snake.PersonalFont(); - this.shapeContainer1 = new Microsoft.VisualBasic.PowerPacks.ShapeContainer(); - this.rectangleShape = new Microsoft.VisualBasic.PowerPacks.RectangleShape(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Game)); this.scoreLabel = new System.Windows.Forms.Label(); - this.exitLabel = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); + this.topBorderPictureBox = new System.Windows.Forms.PictureBox(); + this.leftBorderPictureBox = new System.Windows.Forms.PictureBox(); + this.exitPictureBox = new System.Windows.Forms.PictureBox(); this.gameBoard = new Snake.DoubleBufferPanel(); this.fruitPictureBox = new System.Windows.Forms.PictureBox(); this.insectPictureBox = new System.Windows.Forms.PictureBox(); + this.bottomBorderPictureBox = new System.Windows.Forms.PictureBox(); + this.rightBorderPictureBox = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.topBorderPictureBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.leftBorderPictureBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.exitPictureBox)).BeginInit(); this.gameBoard.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.fruitPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.insectPictureBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bottomBorderPictureBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.rightBorderPictureBox)).BeginInit(); this.SuspendLayout(); - - // - // shapeContainer1 - // - this.shapeContainer1.Location = new System.Drawing.Point(0, 0); - this.shapeContainer1.Margin = new System.Windows.Forms.Padding(0); - this.shapeContainer1.Name = "shapeContainer1"; - this.shapeContainer1.Shapes.AddRange(new Microsoft.VisualBasic.PowerPacks.Shape[] { - this.rectangleShape}); - this.shapeContainer1.Size = new System.Drawing.Size(794, 565); - this.shapeContainer1.TabIndex = 0; - this.shapeContainer1.TabStop = false; - // - // rectangleShape - // - this.rectangleShape.BorderWidth = 4; - this.rectangleShape.Location = new System.Drawing.Point(20, 20); - this.rectangleShape.Name = "rectangleShape"; - this.rectangleShape.Size = new System.Drawing.Size(755, 480); // // scoreLabel // this.scoreLabel.AutoSize = true; - this.scoreLabel.Font = new System.Drawing.Font(myFont.getPersonalFont(), 19.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.scoreLabel.Location = new System.Drawing.Point(317, 509); + this.scoreLabel.Location = new System.Drawing.Point(336, 496); + this.scoreLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.scoreLabel.Name = "scoreLabel"; - this.scoreLabel.Size = new System.Drawing.Size(118, 38); + this.scoreLabel.Size = new System.Drawing.Size(44, 13); this.scoreLabel.TabIndex = 4; this.scoreLabel.Text = "Score : "; this.scoreLabel.Visible = false; // - // exitLabel - // - this.exitLabel.AutoSize = true; - this.exitLabel.Font = new System.Drawing.Font(myFont.getPersonalFont(), 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.exitLabel.Location = new System.Drawing.Point(710, 516); - this.exitLabel.Name = "exitLabel"; - this.exitLabel.Size = new System.Drawing.Size(66, 28); - this.exitLabel.TabIndex = 7; - this.exitLabel.Text = "EXIT"; - this.exitLabel.Click += new System.EventHandler(this.exitLabel_Click); - // // textBox1 // - this.textBox1.Location = new System.Drawing.Point(20, 519); + this.textBox1.Location = new System.Drawing.Point(16, 415); + this.textBox1.Margin = new System.Windows.Forms.Padding(2); this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(0, 22); + this.textBox1.Size = new System.Drawing.Size(1, 20); this.textBox1.TabIndex = 9; this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown); // + // topBorderPictureBox + // + this.topBorderPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("topBorderPictureBox.Image"))); + this.topBorderPictureBox.Location = new System.Drawing.Point(11, 12); + this.topBorderPictureBox.Name = "topBorderPictureBox"; + this.topBorderPictureBox.Size = new System.Drawing.Size(762, 3); + this.topBorderPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.topBorderPictureBox.TabIndex = 13; + this.topBorderPictureBox.TabStop = false; + // + // leftBorderPictureBox + // + this.leftBorderPictureBox.Image = global::Snake.Properties.Resources.VerticalBorder; + this.leftBorderPictureBox.Location = new System.Drawing.Point(11, 15); + this.leftBorderPictureBox.Name = "leftBorderPictureBox"; + this.leftBorderPictureBox.Size = new System.Drawing.Size(3, 476); + this.leftBorderPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.leftBorderPictureBox.TabIndex = 11; + this.leftBorderPictureBox.TabStop = false; + // + // exitPictureBox + // + this.exitPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("exitPictureBox.Image"))); + this.exitPictureBox.Location = new System.Drawing.Point(714, 495); + this.exitPictureBox.Name = "exitPictureBox"; + this.exitPictureBox.Size = new System.Drawing.Size(53, 28); + this.exitPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.exitPictureBox.TabIndex = 10; + this.exitPictureBox.TabStop = false; + this.exitPictureBox.Click += new System.EventHandler(this.exitPictureBox_Click_1); + // // gameBoard // this.gameBoard.BackColor = System.Drawing.Color.Transparent; this.gameBoard.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.gameBoard.Controls.Add(this.fruitPictureBox); this.gameBoard.Controls.Add(this.insectPictureBox); - this.gameBoard.Location = new System.Drawing.Point(20, 20); + this.gameBoard.Location = new System.Drawing.Point(14, 15); + this.gameBoard.Margin = new System.Windows.Forms.Padding(2); this.gameBoard.Name = "gameBoard"; - this.gameBoard.Size = new System.Drawing.Size(755, 480); + this.gameBoard.Size = new System.Drawing.Size(756, 476); this.gameBoard.TabIndex = 8; // // fruitPictureBox // this.fruitPictureBox.Image = global::Snake.Properties.Resources.Fruit; - this.fruitPictureBox.Location = new System.Drawing.Point(-666, -666); + this.fruitPictureBox.Location = new System.Drawing.Point(-533, -533); + this.fruitPictureBox.Margin = new System.Windows.Forms.Padding(2); this.fruitPictureBox.Name = "fruitPictureBox"; this.fruitPictureBox.Size = new System.Drawing.Size(12, 12); + this.fruitPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.fruitPictureBox.TabIndex = 1; this.fruitPictureBox.TabStop = false; // // insectPictureBox // this.insectPictureBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); - this.insectPictureBox.Image = global::Snake.Properties.Resources.BlackInvader; + this.insectPictureBox.Image = global::Snake.Properties.Resources.Insect; this.insectPictureBox.InitialImage = null; - this.insectPictureBox.Location = new System.Drawing.Point(484, 240); + this.insectPictureBox.Location = new System.Drawing.Point(387, 192); + this.insectPictureBox.Margin = new System.Windows.Forms.Padding(2); this.insectPictureBox.Name = "insectPictureBox"; this.insectPictureBox.Size = new System.Drawing.Size(26, 26); + this.insectPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.insectPictureBox.TabIndex = 0; this.insectPictureBox.TabStop = false; this.insectPictureBox.Visible = false; // + // bottomBorderPictureBox + // + this.bottomBorderPictureBox.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.bottomBorderPictureBox.Image = global::Snake.Properties.Resources.HorizontalBorder; + this.bottomBorderPictureBox.Location = new System.Drawing.Point(11, 491); + this.bottomBorderPictureBox.Name = "bottomBorderPictureBox"; + this.bottomBorderPictureBox.Size = new System.Drawing.Size(762, 3); + this.bottomBorderPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.bottomBorderPictureBox.TabIndex = 14; + this.bottomBorderPictureBox.TabStop = false; + // + // rightBorderPictureBox + // + this.rightBorderPictureBox.Image = global::Snake.Properties.Resources.VerticalBorder; + this.rightBorderPictureBox.Location = new System.Drawing.Point(770, 15); + this.rightBorderPictureBox.Name = "rightBorderPictureBox"; + this.rightBorderPictureBox.Size = new System.Drawing.Size(3, 476); + this.rightBorderPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.rightBorderPictureBox.TabIndex = 12; + this.rightBorderPictureBox.TabStop = false; + // // Game // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.AutoSize = true; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); - this.ClientSize = new System.Drawing.Size(794, 565); + this.ClientSize = new System.Drawing.Size(784, 531); + this.Controls.Add(this.bottomBorderPictureBox); + this.Controls.Add(this.topBorderPictureBox); + this.Controls.Add(this.rightBorderPictureBox); + this.Controls.Add(this.leftBorderPictureBox); + this.Controls.Add(this.exitPictureBox); this.Controls.Add(this.textBox1); this.Controls.Add(this.gameBoard); - this.Controls.Add(this.exitLabel); this.Controls.Add(this.scoreLabel); - this.Controls.Add(this.shapeContainer1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Margin = new System.Windows.Forms.Padding(2); this.MaximizeBox = false; this.Name = "Game"; this.Text = "Snake"; + ((System.ComponentModel.ISupportInitialize)(this.topBorderPictureBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.leftBorderPictureBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.exitPictureBox)).EndInit(); this.gameBoard.ResumeLayout(false); + this.gameBoard.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.fruitPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.insectPictureBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bottomBorderPictureBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.rightBorderPictureBox)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -150,15 +201,16 @@ private void InitializeComponent() #endregion - private Microsoft.VisualBasic.PowerPacks.ShapeContainer shapeContainer1; - private Microsoft.VisualBasic.PowerPacks.RectangleShape rectangleShape; private System.Windows.Forms.Label scoreLabel; - private System.Windows.Forms.Label exitLabel; private System.Windows.Forms.TextBox textBox1; private PictureBox insectPictureBox; private PictureBox fruitPictureBox; private DoubleBufferPanel gameBoard; - private PersonalFont myFont; + private PictureBox exitPictureBox; + private PictureBox leftBorderPictureBox; + private PictureBox topBorderPictureBox; + private PictureBox bottomBorderPictureBox; + private PictureBox rightBorderPictureBox; } public class DoubleBufferPanel : System.Windows.Forms.Panel @@ -175,5 +227,18 @@ public DoubleBufferPanel() } } + public class RoundedPanel : System.Windows.Forms.Panel + { + protected override void OnResize(EventArgs e) + { + using (var path = new GraphicsPath()) + { + path.AddEllipse(new Rectangle(0, 0, this.Width - 1, this.Height - 1)); + this.Region = new Region(path); + } + base.OnResize(e); + } + } + } diff --git a/Snake/Game.cs b/Snake/Game.cs index ca04b3c..b9940cf 100644 --- a/Snake/Game.cs +++ b/Snake/Game.cs @@ -29,7 +29,8 @@ public partial class Game : Form private Boolean _GameOver; // Boolean which detects if the game is over or not. private int _TimerInterval; // Timer interval. private Menu _Menu; // The menu. - private List _SnakeGraphicalParts; // List of panel which contains Snake graphical parts. + private List _SnakeGraphicalParts; // List of panel which contains Snake graphical parts. + private PersonalFont _MyFont; // The special font. #endregion @@ -40,6 +41,7 @@ public partial class Game : Form public Game() { InitializeComponent(); // Initialize components of the form (essentially the menu). + InitializeFont(); // Initialize font. LoadMenu(); // Load menu. } @@ -54,11 +56,11 @@ public Game() public void InitializeGame() { - _FullSnake = new FullSnake(); // New FullSnake. + _FullSnake = new FullSnake(this.gameBoard.Width); // New FullSnake. _Fruit = new Fruit(this.gameBoard.Width, this.gameBoard.Height); // New fruit. _Insect = new Insect(this.gameBoard.Width, this.gameBoard.Height,-666, -666); // New insect. - _SnakeGraphicalParts = new List(); + _SnakeGraphicalParts = new List(); _Score = 0; // Score is set to 0. _TimerInterval = 140; // Timer interval tick is set to 140 ms. @@ -85,7 +87,7 @@ public void TimerTick(object sender, EventArgs e) if (!_GameOver) { - _FullSnake.UpdateSnake(_Direction, this.gameBoard.Width, this.gameBoard.Height); // Update the movement of the snake. + _FullSnake.UpdateSnake(_Direction, this.gameBoard.Width); // Update the movement of the snake. _RefreshItem = false; // Set the boolean for the refresh of the item to false. @@ -97,7 +99,7 @@ public void TimerTick(object sender, EventArgs e) _Timer.Interval -= 5; // Increase the difficulty by decreasing the timer interval. else if (_Timer.Interval < 110 && _Timer.Interval > 70) // _Timer.Interval -= 10; // - _FullSnake.AddSnakePart(); // Add a Snake part. + _FullSnake.AddSnakePart(this.gameBoard.Width); // Add a Snake part. _RefreshItem = true; // Set the boolean for the refresh of the item to true. } @@ -151,9 +153,9 @@ private void LoadMenu() _Menu.Location = new Point(20, 20); // Define the location of the menu. this.gameBoard.Controls.Add(_Menu); // Add it to the gameboard. _Menu.MainMenu(); // Set the configuration for a game start (hide/show labels). - _Menu.playLabel.Click += new EventHandler(playLabel_Click); ///// - _Menu.retryLabel.Click += new EventHandler(retryLabel_Click); // Define event handlers - _Menu.mainMenuLabel.Click += new EventHandler(mainMenuLabel_Click); // Define event handlers + _Menu.playPictureBox.Click += new EventHandler(playPictureBox_Click); ///// + _Menu.retryPictureBox.Click += new EventHandler(retryPictureBox_Click); // Define event handlers + _Menu.mainMenuPictureBox.Click += new EventHandler(mainMenuPictureBox_Click); // Define event handlers } //////////////////////// @@ -221,7 +223,8 @@ public void RenderSnake() for (int i = 0; i < _FullSnake.Get_SnakeSize(); i++) { if (_SnakeGraphicalParts.Count < _FullSnake.Get_SnakeSize()) // If there is not enough panel in the pool ... - _SnakeGraphicalParts.Add(new Panel()); // ...Add it one. + //_SnakeGraphicalParts.Add(new Panel()); // ...Add it one. + _SnakeGraphicalParts.Add(new RoundedPanel()); // ...Add it one. _SnakeGraphicalParts[i].Location = new System.Drawing.Point(_FullSnake.Get_Snake()[i].Get_X(), _FullSnake.Get_Snake()[i].Get_Y()); // Definition of the panel location. _SnakeGraphicalParts[i].Size = new System.Drawing.Size(_FullSnake.Get_Snake()[i].Get_SIDE(), _FullSnake.Get_Snake()[i].Get_SIDE()); // Definition of the panel size. @@ -231,38 +234,50 @@ public void RenderSnake() } } + ///////////////////////////// + // Method to initialize font + + public void InitializeFont() + { + this._MyFont = new PersonalFont(); // Create new font. + this.scoreLabel.Font = new System.Drawing.Font(_MyFont.getPersonalFont(), 19.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + } + #endregion #region Events Methods - ///////////////////////////////////// - // Event for clicking the exit label + ///////////////////////////////////////// + // Event for clicking the retryPictureBox - void retryLabel_Click(object sender, EventArgs e) + void retryPictureBox_Click(object sender, EventArgs e) { PlayGame(); // Play game. } - ///////////////////////////////////// - // Event for clicking the exit label + ///////////////////////////////////////////// + // Event for clicking the mainMenuPictureBox - void mainMenuLabel_Click(object sender, EventArgs e) + void mainMenuPictureBox_Click(object sender, EventArgs e) { this.gameBoard.Controls.Clear(); // Clear the panel. this.gameBoard.Controls.Add(_Menu); // Attach the menu to the gameboard. this.scoreLabel.Visible = false; // Initialize interface: Essentially show the score label. _Menu.MainMenu(); // Set the configuration for the menu (hide/show labels). } - - private void exitLabel_Click(object sender, EventArgs e) + + ///////////////////////////////////////// + // Event for clicking the exitPictureBox + + private void exitPictureBox_Click_1(object sender, EventArgs e) { - Close(); // Exit program. + Close(); // Exit program } - ///////////////////////////////////// - // Event for clicking the play label + ////////////////////////////////////////// + // Event for clicking the playPictureBox - private void playLabel_Click(object sender, EventArgs e) + private void playPictureBox_Click(object sender, EventArgs e) { PlayGame(); // Play game. this.insectPictureBox.Visible = true; // Show the insect. @@ -293,6 +308,5 @@ private void textBox1_KeyDown(object sender, KeyEventArgs e) } #endregion - } } diff --git a/Snake/Game.resx b/Snake/Game.resx index 5ea0895..0a57c99 100644 --- a/Snake/Game.resx +++ b/Snake/Game.resx @@ -117,4 +117,29 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAvoAAAADCAYAAADiHastAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAA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34ufsIo + Hp1RPDqjeHRG8eiM4rFZ7v4AV+xUD3vVmqUAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/Snake/Insect.cs b/Snake/Insect.cs index 1d37ece..26a60b8 100644 --- a/Snake/Insect.cs +++ b/Snake/Insect.cs @@ -13,7 +13,8 @@ class Insect private int _X; // Position in X. private int _Y; // Position in Y. private const int _POINT = 25; // The points earned when item reached. - private const int _SIDE = 26; // Size of the panel side. + private int _SIDE; // Size of the insect. + private Random _RandomNumber; // Random number. #endregion @@ -23,13 +24,15 @@ class Insect public Insect(int width, int height) { - Random randomNumber = new Random(); // Initialize the generator of random. - _X = (_SIDE + 2) * (randomNumber.Next(width - _SIDE) / (_SIDE + 2)); // Set _X thanks to a generated number. - _Y = (_SIDE + 2) * (randomNumber.Next(height - _SIDE) / (_SIDE + 2)); // Set _Y thanks to another generated number. + _SIDE = width / 27 - 2; // Initialize dynamically the side of the insect. + Random _RandomNumber = new Random(); // Initialize the generator of random. + _X = (_SIDE + 2) * (_RandomNumber.Next(width - _SIDE) / (_SIDE + 2)); // Set _X thanks to a generated number. + _Y = (_SIDE + 2) * (_RandomNumber.Next(height - _SIDE) / (_SIDE + 2)); // Set _Y thanks to another generated number. } public Insect(int width, int height, int x, int y) { + Random _RandomNumber = new Random(); // Initialize the generator of random. _X = x; _Y = y; } @@ -58,9 +61,10 @@ public Boolean IsReached(SnakePart snake) public void MoveInsect(int width, int height, FullSnake fullSnake) { - Random randomNumber = new Random(); // Initialize the generator of random. - _X = (_SIDE + 2) * (randomNumber.Next(width - _SIDE) / (_SIDE + 2)); // Set _X thanks to a generated number. - _Y = (_SIDE + 2) * (randomNumber.Next(height - _SIDE) / (_SIDE + 2)); // Set _Y thanks to another generated number. + _SIDE = width / 27 - 2; // Initialize dynamically the side of the insect. + _RandomNumber = new Random(); // Générate a new random number. + _X = (_SIDE + 2) * (_RandomNumber.Next(width - _SIDE) / (_SIDE + 2)); // Set _X thanks to a generated number. + _Y = (_SIDE + 2) * (_RandomNumber.Next(height - _SIDE) / (_SIDE + 2)); // Set _Y thanks to another generated number. for (int i = 0; i < fullSnake.Get_SnakeSize(); i++) { diff --git a/Snake/Menu.Designer.cs b/Snake/Menu.Designer.cs index a8aa0aa..1285c17 100644 --- a/Snake/Menu.Designer.cs +++ b/Snake/Menu.Designer.cs @@ -30,91 +30,101 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.myFont = new Snake.PersonalFont(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Menu)); this.menuPanel = new System.Windows.Forms.Panel(); - this.mainMenuLabel = new System.Windows.Forms.Label(); - this.retryLabel = new System.Windows.Forms.Label(); - this.gameOverLabel = new System.Windows.Forms.Label(); - this.playLabel = new System.Windows.Forms.Label(); - this.titleLabel = new System.Windows.Forms.Label(); + this.mainMenuPictureBox = new System.Windows.Forms.PictureBox(); + this.retryPictureBox = new System.Windows.Forms.PictureBox(); + this.gameOverPictureBox = new System.Windows.Forms.PictureBox(); + this.playPictureBox = new System.Windows.Forms.PictureBox(); + this.titlePictureBox = new System.Windows.Forms.PictureBox(); this.menuPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.mainMenuPictureBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.retryPictureBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gameOverPictureBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.playPictureBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.titlePictureBox)).BeginInit(); this.SuspendLayout(); - // // menuPanel // this.menuPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); - this.menuPanel.Controls.Add(this.mainMenuLabel); - this.menuPanel.Controls.Add(this.retryLabel); - this.menuPanel.Controls.Add(this.gameOverLabel); - this.menuPanel.Controls.Add(this.playLabel); - this.menuPanel.Controls.Add(this.titleLabel); - this.menuPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.menuPanel.Controls.Add(this.mainMenuPictureBox); + this.menuPanel.Controls.Add(this.retryPictureBox); + this.menuPanel.Controls.Add(this.gameOverPictureBox); + this.menuPanel.Controls.Add(this.playPictureBox); + this.menuPanel.Controls.Add(this.titlePictureBox); this.menuPanel.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.menuPanel.Location = new System.Drawing.Point(0, 0); + this.menuPanel.Margin = new System.Windows.Forms.Padding(2); this.menuPanel.Name = "menuPanel"; - this.menuPanel.Size = new System.Drawing.Size(755, 480); + this.menuPanel.Size = new System.Drawing.Size(756, 476); this.menuPanel.TabIndex = 0; // - // mainMenuLabel + // mainMenuPictureBox // - this.mainMenuLabel.AutoSize = true; - this.mainMenuLabel.Font = new System.Drawing.Font(myFont.getPersonalFont(), 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.mainMenuLabel.Location = new System.Drawing.Point(257, 272); - this.mainMenuLabel.Name = "mainMenuLabel"; - this.mainMenuLabel.Size = new System.Drawing.Size(211, 44); - this.mainMenuLabel.TabIndex = 10; - this.mainMenuLabel.Text = "Main Menu"; + this.mainMenuPictureBox.Image = global::Snake.Properties.Resources.MainMenu; + this.mainMenuPictureBox.Location = new System.Drawing.Point(272, 240); + this.mainMenuPictureBox.Name = "mainMenuPictureBox"; + this.mainMenuPictureBox.Size = new System.Drawing.Size(189, 54); + this.mainMenuPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.mainMenuPictureBox.TabIndex = 15; + this.mainMenuPictureBox.TabStop = false; // - // retryLabel + // retryPictureBox // - this.retryLabel.AutoSize = true; - this.retryLabel.Font = new System.Drawing.Font(myFont.getPersonalFont(), 25F); - this.retryLabel.Location = new System.Drawing.Point(305, 207); - this.retryLabel.Name = "retryLabel"; - this.retryLabel.Size = new System.Drawing.Size(111, 47); - this.retryLabel.TabIndex = 9; - this.retryLabel.Text = "Retry"; + this.retryPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("retryPictureBox.Image"))); + this.retryPictureBox.Location = new System.Drawing.Point(327, 187); + this.retryPictureBox.Name = "retryPictureBox"; + this.retryPictureBox.Size = new System.Drawing.Size(86, 54); + this.retryPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.retryPictureBox.TabIndex = 14; + this.retryPictureBox.TabStop = false; // - // gameOverLabel + // gameOverPictureBox // - this.gameOverLabel.AutoSize = true; - this.gameOverLabel.Font = new System.Drawing.Font(myFont.getPersonalFont(), 52F); - this.gameOverLabel.Location = new System.Drawing.Point(142, 97); - this.gameOverLabel.Name = "gameOverLabel"; - this.gameOverLabel.Size = new System.Drawing.Size(451, 97); - this.gameOverLabel.TabIndex = 8; - this.gameOverLabel.Text = "Game Over"; + this.gameOverPictureBox.Image = global::Snake.Properties.Resources.GameOver; + this.gameOverPictureBox.Location = new System.Drawing.Point(195, 82); + this.gameOverPictureBox.Name = "gameOverPictureBox"; + this.gameOverPictureBox.Size = new System.Drawing.Size(343, 99); + this.gameOverPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.gameOverPictureBox.TabIndex = 13; + this.gameOverPictureBox.TabStop = false; // - // playLabel + // playPictureBox // - this.playLabel.AutoSize = true; - this.playLabel.Font = new System.Drawing.Font(myFont.getPersonalFont(), 28F); - this.playLabel.Location = new System.Drawing.Point(235, 205); - this.playLabel.Name = "playLabel"; - this.playLabel.Size = new System.Drawing.Size(267, 53); - this.playLabel.TabIndex = 7; - this.playLabel.Text = "Single Player"; + this.playPictureBox.Image = global::Snake.Properties.Resources.Play; + this.playPictureBox.Location = new System.Drawing.Point(318, 181); + this.playPictureBox.Name = "playPictureBox"; + this.playPictureBox.Size = new System.Drawing.Size(89, 72); + this.playPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.playPictureBox.TabIndex = 12; + this.playPictureBox.TabStop = false; // - // titleLabel + // titlePictureBox // - this.titleLabel.AutoSize = true; - this.titleLabel.Font = new System.Drawing.Font(myFont.getPersonalFont(), 63F); - this.titleLabel.Location = new System.Drawing.Point(115, 69); - this.titleLabel.Name = "titleLabel"; - this.titleLabel.Size = new System.Drawing.Size(515, 117); - this.titleLabel.TabIndex = 6; - this.titleLabel.Text = "- SNAKE -"; + this.titlePictureBox.Image = ((System.Drawing.Image)(resources.GetObject("titlePictureBox.Image"))); + this.titlePictureBox.Location = new System.Drawing.Point(137, 64); + this.titlePictureBox.Name = "titlePictureBox"; + this.titlePictureBox.Size = new System.Drawing.Size(459, 125); + this.titlePictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.titlePictureBox.TabIndex = 11; + this.titlePictureBox.TabStop = false; // // Menu // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; this.Controls.Add(this.menuPanel); + this.Margin = new System.Windows.Forms.Padding(2); this.Name = "Menu"; - this.Size = new System.Drawing.Size(755, 480); + this.Size = new System.Drawing.Size(758, 478); this.menuPanel.ResumeLayout(false); - this.menuPanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.mainMenuPictureBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.retryPictureBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gameOverPictureBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.playPictureBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.titlePictureBox)).EndInit(); this.ResumeLayout(false); } @@ -122,11 +132,10 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Panel menuPanel; - private System.Windows.Forms.Label titleLabel; - internal System.Windows.Forms.Label playLabel; - private System.Windows.Forms.Label gameOverLabel; - internal System.Windows.Forms.Label retryLabel; - internal System.Windows.Forms.Label mainMenuLabel; - private PersonalFont myFont; + internal PictureBox titlePictureBox; + internal PictureBox playPictureBox; + private PictureBox gameOverPictureBox; + internal PictureBox retryPictureBox; + internal PictureBox mainMenuPictureBox; } } diff --git a/Snake/Menu.cs b/Snake/Menu.cs index 7ee06b2..497a4c3 100644 --- a/Snake/Menu.cs +++ b/Snake/Menu.cs @@ -23,30 +23,30 @@ public Menu() internal void MainMenu() { - this.playLabel.Visible = true; // Show playLabel. - this.titleLabel.Visible = true; // Show titleLabel. - this.gameOverLabel.Visible = false; // Hide gameOverLabel. - this.retryLabel.Visible = false; // Hide retryLabel. - this.mainMenuLabel.Visible = false; // Hide mainMenuLabel. + this.playPictureBox.Visible = true; // Show playPictureBox. + this.titlePictureBox.Visible = true; // Show titlePictureBox. + this.gameOverPictureBox.Visible = false; // Hide gameOverPictureBox. + this.retryPictureBox.Visible = false; // Hide retryPictureBox. + this.mainMenuPictureBox.Visible = false; // Hide mainMenuPictureBox. } internal void InGame() { - this.playLabel.Visible = false; // Hide playLabel. - this.titleLabel.Visible = false; // Hide titleLabel. - this.gameOverLabel.Visible = false; // Hide gameOverLabel. - this.retryLabel.Visible = false; // Hide retryLabel. - this.mainMenuLabel.Visible = false; // Hide mainMenuLabel. + this.playPictureBox.Visible = false; // Hide playPictureBox. + this.titlePictureBox.Visible = false; // Hide titlePictureBox. + this.gameOverPictureBox.Visible = false; // Hide gameOverPictureBox. + this.retryPictureBox.Visible = false; // Hide retryPictureBox. + this.mainMenuPictureBox.Visible = false; // Hide mainMenuPictureBox. this.Visible = false; } internal void GameOver() { - this.playLabel.Visible = false; // Hide playLabel. - this.titleLabel.Visible = false; // Hide titleLabel. - this.gameOverLabel.Visible = true; // Show gameOverLabel. - this.retryLabel.Visible = true; // Show retryLabel. - this.mainMenuLabel.Visible = true; // Show mainMenuLabel. + this.playPictureBox.Visible = false; // Hide playPictureBox. + this.titlePictureBox.Visible = false; // Hide titlePictureBox. + this.gameOverPictureBox.Visible = true; // Show gameOverPictureBox. + this.retryPictureBox.Visible = true; // Show retryPictureBox. + this.mainMenuPictureBox.Visible = true; // Show mainMenuPictureBox. } #endregion diff --git a/Snake/Menu.resx b/Snake/Menu.resx index 5ea0895..59963c3 100644 --- a/Snake/Menu.resx +++ b/Snake/Menu.resx @@ -117,4 +117,199 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAAFYAAAA2CAYAAABdom6tAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL + DAAACwwBP0AiyAAAAAd0SU1FB90CFw4fO6O1U6cAAAcFSURBVHhe7dftcRRJEIRhOYMXOIENuIALeIAH + WIAFOIADOIADGKDj0d27UWp6RyL2jiNC8yOZnuqsr+zq0XJ3f39/4j/A1njidmyNJ27H1njidmyNJ27H + 1njidmyNJ27H1njidmyNJ27H1njidmyNJ27H1njidmyNJ27H1njidmyN8OXLl/uPHz/ef/r06cfr/d23 + b9/u4fv373dsHz58uMA7+/R/6fjJQKS3b9/+2Ll7hDdv3jw8X79+/cj+7t27+1evXj2sibzG+x2Q9/Pn + zz+W+/3/A49eTCSh3r9/fxGXaOym17tnQuJpKnHB+ndNr8N20GqSt9v1J+DRC6ESxzohvVuvYCesBvGa + ZvYZ978CIR36169fL7WsnP8Lj16ISZyufTC97AmfeE0p2NdYPr+jSYfpdlTPHyssQef3NRFNhD9miieu + 7xmYFn72upJ88PJ7zmcBRwx47mdEbEJWL98/9lOgwECoplDRngm5AzGB4AQWg8hHQhFnvR1ALHsrf6JD + xJe3g1l5Qe3FriZ8vmr4t6f9spiJPbv6hDoqOPDno1mFwtEE2ZMHVnG9i3XNf36SoOk9qtNBiIdHzPLz + re6jen8Vl4WiFAwam8mfIyzE5Xs0rcWdh+i5Qow1t/qIlI8nm/VRnU3qPES24qhZ3NXPwBzd1IDDvxiX + Dc1WsIYUK5kTfupagqLxrT0Ve61Q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AK + h2EYhmF40AqHYRiGYXjQCodhGIZheNAKh2EYhmF40AqHYRiGYXjQCodhGIZheNAKh2EYhmF40AqHYRiG + YXjQCodhGIZheNAKh2EYhmF40AqHYRiGYXjQCodhGIZheNAKh2EYhmF40AqHYRiGYXjQCodhGIZheNAK + h2EYhmF40AqHYRiGYXjQCodhGIZheNAKh2EYhmF40AqHYRiGYXjQCodhGIZheNAKh2EYhmF40AqHYRiG + YXjQCodhGIZhkF9/+T9F3UO5WsQWjQAAAABJRU5ErkJggg== + + \ No newline at end of file diff --git a/Snake/Properties/Resources.Designer.cs b/Snake/Properties/Resources.Designer.cs index aa6b811..9bea836 100644 --- a/Snake/Properties/Resources.Designer.cs +++ b/Snake/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.18033 +// Ce code a été généré par un outil. +// Version du runtime :4.0.30319.18033 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. // //------------------------------------------------------------------------------ @@ -13,12 +13,12 @@ namespace Snake.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. + // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder + // à l'aide d'un outil, tel que ResGen ou Visual Studio. + // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen + // avec l'option /str ou régénérez votre projet VS. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -33,7 +33,7 @@ internal class Resources { } /// - /// Returns the cached ResourceManager instance used by this class. + /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal class Resources { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Remplace la propriété CurrentUICulture du thread actuel pour toutes + /// les recherches de ressources à l'aide de cette classe de ressource fortement typée. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,17 +61,17 @@ internal class Resources { } /// - /// Looks up a localized resource of type System.Drawing.Bitmap. + /// Recherche une ressource localisée de type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap BlackInvader { + internal static System.Drawing.Bitmap Exit { get { - object obj = ResourceManager.GetObject("BlackInvader", resourceCulture); + object obj = ResourceManager.GetObject("Exit", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// - /// Looks up a localized resource of type System.Drawing.Bitmap. + /// Recherche une ressource localisée de type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap Fruit { get { @@ -81,7 +81,37 @@ internal class Resources { } /// - /// Looks up a localized resource of type System.Byte[]. + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap GameOver { + get { + object obj = ResourceManager.GetObject("GameOver", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap HorizontalBorder { + get { + object obj = ResourceManager.GetObject("HorizontalBorder", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Insect { + get { + object obj = ResourceManager.GetObject("Insect", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Byte[]. /// internal static byte[] Kraboudja { get { @@ -89,5 +119,55 @@ internal class Resources { return ((byte[])(obj)); } } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap MainMenu { + get { + object obj = ResourceManager.GetObject("MainMenu", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Play { + get { + object obj = ResourceManager.GetObject("Play", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Retry { + get { + object obj = ResourceManager.GetObject("Retry", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Title { + get { + object obj = ResourceManager.GetObject("Title", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Recherche une ressource localisée de type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap VerticalBorder { + get { + object obj = ResourceManager.GetObject("VerticalBorder", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/Snake/Properties/Resources.resx b/Snake/Properties/Resources.resx index 627ee0c..fd11b28 100644 --- a/Snake/Properties/Resources.resx +++ b/Snake/Properties/Resources.resx @@ -117,15 +117,38 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ..\Resources\BlackInvader.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Exit.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Fruit.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + + ..\Resources\GameOver.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\HorizontalBorder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\BlackInvader.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\Kraboudja.ttf;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\MainMenu.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Play.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Retry.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Title.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\VerticalBorder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Snake/Snake.csproj b/Snake/Snake.csproj index 959fd0a..5ae2b75 100644 --- a/Snake/Snake.csproj +++ b/Snake/Snake.csproj @@ -142,6 +142,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +