Register for your free account! | Forgot your password?

You last visited: Today at 11:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Create Game Snake

Discussion on Create Game Snake within the Coding Tutorials forum part of the General Coding category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2015
Posts: 23
Received Thanks: 8
Create Game Snake

FULL SOURCE CODE AND VIDEO: *deleted*

PHP Code:
private Rectangle[] snakeRec;
        public 
Rectangle[] SnakeRec
        
{
           
get
           
{
               return 
snakeRec;
           }     
        }
        private 
SolidBrush brush;
        private 
int xywidthheight;
        
///

        /// hàm khởi tạo rắn
        /// 
public Snake() { snakeRec = new Rectangle[3]; brush = new SolidBrush(Color.Red); 200width 10height 10; for (int i 0snakeRec.Lengthi++ ) { snakeRec[i] = new Rectangle(xywidthheight); -= 10; } } ///
/// Vẽ rắn ///

/// public void drawSnake(Graphics paper) { foreach (Rectangle rec in snakeRec) { paper.FillEllipse(brush, rec); } } ///
/// vẽ rắn trong lúc di chuyển ///

public void drawSnakeRun() { for (int i snakeRec.Length 10i--) { snakeRec[i] = snakeRec[1]; } } public void moveDown() { drawSnakeRun(); snakeRec[0].+= 10; } public void moveUp() { drawSnakeRun(); snakeRec[0].-= 10; } public void moveRight() { drawSnakeRun(); snakeRec[0].+= 10; } public void moveLeft() { drawSnakeRun(); snakeRec[0].-= 10; } public void growSnake() { List rec snakeRec.ToList(); rec.Add(new Rectangle(snakeRec[snakeRec.Length 1].XsnakeRec[snakeRec.Length 1].Ywidthheight)); snakeRec rec.ToArray(); } 
vuongda is offline  
Old 05/17/2016, 23:55   #2
 
elite*gold: 81
Join Date: May 2016
Posts: 129
Received Thanks: 38
Ah cool dude ��
Siciliano01 is offline  
Old 05/18/2016, 23:05   #3
dotCom
 
Devsome's Avatar
 
elite*gold: 12400
The Black Market: 104/0/0
Join Date: Mar 2009
Posts: 15,875
Received Thanks: 4,381
#closed
Link ist down
Devsome is offline  
Closed Thread


Similar Threads Similar Threads
Snake Game + Question about percent chance
03/06/2015 - AutoIt - 2 Replies
Hi, i made this code for "the snake game" with autoit and was thinking about adding some buff/debuffs to the game so it can be challenging... The thing is that don't know how to make it work -> For example lets say we have, but i don't want to be all 25% each Buffs: -Invulnerable -> 15% -Speed Down -> 30%
kleines Snake Game
08/20/2013 - Coding Releases - 6 Replies
Hey, habe mal Just 4 Fun ein kleines Snake Game gebastelt. (in VB.net) Den Code gibts auf Anfrage mitdazu! Für Leute dies intressiert. Können noch einige Bugs drin sein. Steuerung ist: W: Hoch D: Rechts A: Links
[Biete/Sell] 3D Snake-Game
10/10/2012 - Coding Releases - 3 Replies
Sourcecode selled:)
[Biete/Sell] 3D Snake-Game
10/10/2012 - elite*gold Trading - 4 Replies
#Sourcecode selled



All times are GMT +2. The time now is 11:31.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.