YILAN ATILGAN DAĞILGAN 2010514019. Flow Diagram Of The Program Home Screen Choose Difficulty Start Direction of the Snake DeathStop Show Score Yes No.

Slides:



Advertisements
Similar presentations
Java Control Statements
Advertisements

GAME:IT Junior Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a.
What we will cover today… Where is the camera on my phone? Taking a photo Zoom in and out Deleting a photo Where do my photos go to? Viewing my photos.

AS3: Events & Listeners eventListeners in ActionScript 3.
How does it work? (online) Assessment Tool.
Chapter 9 Color, Sound and Graphics
 2007 Dr. Natheer Khasawneh. Chapter 13. Graphical User Interface Concepts: Part 1.
Review for Excel Chapter 1
How to Program the Bypass Tray on most Sharp Models.
1 Conditionals In many cases we want our program to make a decision about whether a piece of code should be executed or not, based on the truth of a condition.
Iterator Pattern Dr. Neal CIS 480. Iterator An iterator pattern can be used when one class is a collection of things and would like to provide a standardized.
Computer Game and Simulation Programming Michael Chi.
Controls General Discussion. VB Controls Visual Basic Controls A control is the generic name for any object placed on a form Controls may be images,
MrsBillinghurst. net A2 Computing A2 Computing Projects Game Animation in Pascal.
Computer Programming and Basic Software Engineering 9 Building Graphical User Interface A Brief Introduction to GDI+ S.R.G. Fraser, Pro Visual C++/CLI.
Android Tutorial Team 3 Jerry Yu Mayank Mandava Mu Du Will Wangles.
Multimedia ! Graphics ! Animation ! Sound Tip Of the Day 4 Tip of the Day: When using graphic methods at Form Load, the AutoRedraw property of the container.
How to make Space Invaders
1 Windows Graphics. 2 Objectives You will be able to Use the Windows GDI+ to draw arbitrary figures and text on a Windows form. Add a handler for the.
COMPUTER PROGRAMMING I Objective 8.03 Apply Animation and Graphic Methods in a Windows Form (4%)
Events and Timers. Event handlers ScratchC#/VS 2 Script == event handler.
Lecture 4 Advanced Topics Devi, Erick, Reddy. » Declare dynamic component, an example: ˃Create a button Button newBtn = new Button(); ˃Create an array.
CS320n –Visual Programming More LabVIEW Control Structures.
More switches, Comparison Day 7 Computer Programming through Robotics CPST 410 Summer 2009.
KeyListener and Keyboard Events Another type of listener listens for keyboard entry – the KeyListener which generates KeyEvents –to implement KeyListener,
Arrays Code: Arrays Controls: Control Arrays, PictureBox, Timer.
Lecture 16: Multithreaded Programming. public partial class Form1 : Form { Thread ct; Thread rt; public static int circle_sleep = 0; public static int.
How to use the timing feature Click to choose a shape, then click on the screen and drag it to place in on the slide.
The PictureBox Control Prefix Prefix – pic Image Property PictureBox Image Property – Changes the image or file that appears inside of the PictureBox SizeMode.
McGraw-Hill © 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter 13 Graphics, Animation, Sound and Drag-and-Drop.
C# GUI - Basics. Objectives.NET supports two types: WinForms, traditional, desktop GUI apps. WebForms – newer, for Web apps. Visual Studio.NET supports.
Piñata Game: Keeping Score in Alice By Maggie Bashford Professor Susan Rodger Duke University July
Visual Basic Games: Week 4 Recap Parallel structures Initialization Prepare for Memory Scoring Shuffling Homework: when ready, move on to next game/chapter.
Lego MindStorm An Introduction to Blocks. Blocks Blocks are used to give instructions to your robot. There are many types of blocks You can use the blocks.
Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions.
TIC TAC TOE. import java.util.Scanner; import java.util.Random; public class PlayTTT{ public static void main(String[]args){ Scanner reader = new Scanner(System.in);
1 x 2 Game 1: One Player Game If you select a number sentence, give the answer. If you select an answer give the number sentence that has that answer.
More loops while and do-while. Recall the for loop in general for (initialization; boolean_expression; update) { }
Objects and Classes Continued Engineering 1D04, Teaching Session 10.
Introduction to Windows Forms Application By N Hanumantha Rao MCA By N Hanumantha Rao MCA.
Marble Racer. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
private void Application_Launching(object sender, LaunchingEventArgs e) { } private void Application_Activated(object.
 2002 Prentice Hall. All rights reserved. 1 Outline Mouse Event Handling Keyboard Event Handling Graphical User Interface Concepts:
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
To gain an overview of the session, the session log file (.LOG) contains the time when each event occurs. The session has its own timer, where “hour zero"
 The MSP430 is a mixed-signal microcontroller family from Texas Instruments. Built around a 16-bit CPU, the MSP430 is designed for low cost and, specifically,
1 Working with Controls at Run Time. 2 Objectives You will be able to Add controls to a Windows form at run time. Modify controls at run time.
Review for Excel Chapter 1. True or False The best way to make minor changes to existing data is to key new data and press the enter key.
GAME:IT Junior Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a.
 Introduction to Search Algorithms  Linear Search  Binary Search 9-2.
Script commands by category 1. Files and directories Start and stop data recording, set script default directories for pictures and data. A quick preview…
Master Builder THE GAME THAT EVERYONE IN THE WORLD HAS BEEN WAITING FOR 3 YEARS FOR THE EPIC, AWESOME GAME. LEGO/NORMAL SHOOTING POLICE GAME. FROM # LOL.
Computer Science Up Down Controls, Decisions and Random Numbers.
CHAPTER 13B Object Oriented Programming (Tutorial)
FLOW OF OPERATIONS. Choose output size Choose output format Correct data types Add/Remove columns Change data types Set bindings Use functions Adjust.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Timed Math Quiz. In This Part, You Learn How to Generate random numbers by using the Random class. Trigger events to occur at a specific time by using.
State machine executed on a change of enable OR evening OR timer.
1 2 3 X O Scoreboard Click Here if X Wins Click Here if
Simple Windows Applications
SNAKE GAME İRFAN ARIK
CS 3870 Web User Control Events.
Visual Basic: Week 5 Review User defined functions
Additional Topics in VB.NET
5/6/2019 Session 8.2 Postback, ViewState
Creating Controls Dynamically in C#
label1 Name label2 Time (0-23) textBox1 textBox2 textBox3 button1
Poker2.jpg Poker14.jpg int num1, num2;
form1 Runner pictureBox1 imageList1 timer1 label1 原地跑步計時 label2 共用了…秒
Presentation transcript:

YILAN ATILGAN DAĞILGAN

Flow Diagram Of The Program Home Screen Choose Difficulty Start Direction of the Snake DeathStop Show Score Yes No Movement of the Snake Show Target True Increase Score Increase Tail Define New Target Play Sound False Wait 100ms or 500ms depend on difficulty Reach Target

Difficulty private void Kolay_Click(object sender, EventArgs e) { Kolay2.Visible = true; Kolay.Visible = false; Zor.Visible = true; Zor2.Visible = false; zorluk = 500; } private void Zor_Click(object sender, EventArgs e) { Kolay.Visible = true; Kolay2.Visible = false; Zor2.Visible = true; Zor.Visible = false; zorluk = 100; }

Start private void Basla_Click(object sender, EventArgs e) { timer1.Enabled = true; timer1.Interval = zorluk; Basla.Visible = false; Kolay.Visible = false; Zor.Visible = false; Kolay2.Visible = false; Zor2.Visible = false; Kapat.Visible = false; AnaSayfa.Visible = false; }

public void timer1_Tick(object sender, EventArgs e) { kafa_hareketi isim1 = new kafa_hareketi(yukarisi, asagisi, solu, sagı, kafa); label1.Text = puan.ToString(); label2.Text = puan.ToString(); kafa = isim1.kafaclass; a = a + 1; Olum(); belirme(); kaybolma(); YemBelirme(); if (yem == kafa) { puan = puan + 123; kuyruk = kuyruk + 1; YemYeri(); System.Media.SystemSounds.Beep.Play(); } }

«kafa_hareketi» public int kafaclass; public kafa_hareketi(bool yukari,bool asagi,bool sol,bool sag,int kafa) { if(yukari==true) { kafa = kafa - 20; if(kafa < 1) { kafa = kafa + 400; } if (asagi == true) { kafa = kafa + 20; if (kafa > 400) { kafa = kafa - 400; }

if (sol == true) { kafa = kafa-1; if(kafa==0||kafa==20||kafa==40||kafa==60||kafa==80||kafa==100||kafa== 120||k afa==140||kafa==160||kafa==180||kafa==200||kafa==220||kafa= =240||kafa== 260||kafa==280||kafa==300||kafa==320||kafa==340||kafa==360 ||kafa==380) { kafa = kafa + 20; } if (sag == true) { kafa = kafa+1; if (kafa == 401 || kafa == 21 || kafa == 41 || kafa == 61 || kafa == 81 || kafa == 101 || kafa == 121 || kafa == 141 || kafa == 161 || kafa == 181 || kafa == 201 || kafa == 221 || kafa == 241 || kafa == 261 || kafa == 281 || kafa == 301 || kafa == 321 || kafa == 341 || kafa == 361 || kafa == 381) { kafa = kafa - 20; } kafaclass = kafa;

Olum() switch(kafa) { case 1: if(pictureBox1.Visible==true & yem!=1) { AnaSayfa.Visible = true; OyunBitti.Visible = true; label2.Visible = true; timer2.Enabled = true; } break; case 2: if (pictureBox2.Visible == true & yem != 2) { AnaSayfa.Visible = true; OyunBitti.Visible = true; label2.Visible = true; timer2.Enabled = true; }

timer2_Tick OyunBitti.Visible = false; label2.Visible = false; timer2.Enabled = false; Sifirla();

Sifirla() timer1.Enabled = false; kuyruk = 3; kafa = 210; yukarisi = false; asagisi = false; solu = false; sagı = true; Basla.Visible = true; Kapat.Visible = true; if(timer1.Interval==500) { Kolay2.Visible = true; Zor.Visible = true; } else { Kolay.Visible = true; Zor2.Visible = true; } pictureBox1.Visible = false; pictureBox2.Visible = false; pictureBox3.Visible = false;

belirme() switch (kafa) { case 1: pictureBox1.Visible = true; array1[1] = a; break; case 2: pictureBox2.Visible = true; array1[2] = a; break;

kaybolma() if ((array1[1] + kuyruk) == a) pictureBox1.Visible = false; if ((array1[2] + kuyruk) == a) pictureBox2.Visible = false; if ((array1[3] + kuyruk) == a) pictureBox3.Visible = false;

YemYeri() Random rastgele=new Random(); for(bool tekrar=true;tekrar==true;) { switch(yem) { case 1: if(pictureBox1.Visible==true) { yem = rastgele.Next(1, 401); tekrar = true; break; } tekrar = false; break; case 2: if (pictureBox2.Visible == true) { yem = rastgele.Next(1, 401); tekrar = true; break; } tekrar = false; break;

References  up-down-left-and-right-arrow-keys-do-not- trigger-keydown-event  ama_Dili/Rastgele_say%C4%B1_%C3%BCretm e  /03/27/ aspx