SlideShare a Scribd company logo
1 of 19
UMUT KIRAÇ
 Game board is 8*8 fields.
 There are numbers between -9 and 9 except 0.
 Player can only move the cursor horizontally.
 Computer/Player2 can only move the cursor vertically.
 Collected numbers are added to their scores.
 if there is no possible move no number in the row or
coloumn, the game is over.
EASY MODE
 COMPUTER CAN ONLY CHOOSE LARGEST
NUMBER IN THAT COLUMN.
HARD MODE
 IN THIS MODE, COMPUTER IS MORE
INTELLIGENT BECAUSE OF US.
 COMPUTER GUESS THAT YOU’LL CHOOSE
NUMBERS.
 IN THIS MODE YOU CAN PLAY AGAINST YOUR
FRIENDS.
 PLAYER AND COMPUTER MAY CHOOSE NULL
POINT.
move = Console.ReadKey(true);
if (move.Key == ConsoleKey.D1)
{
j = 0;
i = cursor_y - 1;
……………………………
if(satir[i,j]==-10)
Console.Write("--Null Point-- Enter A New Point!!");
}
 PLAYER MAY PRESS UNVALID KEY.
while (move.Key != ConsoleKey.NumPad1 & ……… &
move.Key != ConsoleKey.NumPad8)
{
Console.Write(" Unvalid Chosen Key!! ");
move = Console.ReadKey(true);
}
 RETURN IN NESTED MENU.
if (menu1 == 1)
{
Console.WriteLine("1.EASY ");
Console.WriteLine("2.HARD ");
Console.WriteLine("3.BACK TO MENU");
menu2 = Convert.ToInt32(Console.ReadLine());
}
Console.Clear();
}
while (menu1 == 3 | menu2 == 3 | menu == 2);
 if there is no possible move no number in the row or
coloumn, the game is over.
while(…….)
{
count = 0;
for (b = 0; b < 8; b++)
{
if (satir[cursor_y - 1, b] == -10)
count++;
}
if (count == 8)
break;
}
 COMPUTER CAN FINISH THE GAME IF IT WIN.
for (b = 0; b < 8; b++)
{
count = 0;
for (d = 0; d < 8; d++)
{
if (satir[b, d] == -10 & satir[b, j] != -10)
count++;
if (count == 7)
{
cursor_y = b + 1;
break;
}
}
 PROBLEMS ABOUT A.I
for (b = 0; b < 8; b++)
{
number1 = -20;
for (d = 0; d < 8; d++)
{
if ((number1 < satir[b, d]) & (satir[b, d] != -10) & (d != j))
{
number1 = satir[b, d];
e = b;
f = d;
}
}
if ((number2 < satir[b, j] - satir[e, f]) & (satir[b, j] != -10))
{
number2 = satir[b, j] - satir[e, f];
cursor_y = b + 1;
}
}
System.Threading.Thread.Sleep(1000);
Console.Beep();
Try and Catch code.
MAKE A MENU
CREATE AN ARTIFICIAL INTELLEGENCE
 www.csharpnedir.com
 www.socialmsdn.microsoft.com/forums
 www.wikibooks.org
 www.csharp-station.com
 www.reddit.com/csharp

More Related Content

What's hot

Programming the BBC micro:bit with MicroPython by Dunham High School
Programming the BBC micro:bit with MicroPython by Dunham High SchoolProgramming the BBC micro:bit with MicroPython by Dunham High School
Programming the BBC micro:bit with MicroPython by Dunham High SchoolPYCON MY PLT
 
Pre-Alg 6.1 Positive Integers
Pre-Alg 6.1 Positive IntegersPre-Alg 6.1 Positive Integers
Pre-Alg 6.1 Positive IntegersJaqueline Vallejo
 
اختبارات maths للصف الثالث الابتدائى نصف العام 2015
اختبارات maths للصف الثالث الابتدائى نصف العام 2015  اختبارات maths للصف الثالث الابتدائى نصف العام 2015
اختبارات maths للصف الثالث الابتدائى نصف العام 2015 أمنية وجدى
 
Deccan rummy – how to play pool rummy?
Deccan rummy – how to play pool rummy?Deccan rummy – how to play pool rummy?
Deccan rummy – how to play pool rummy?DeccanRummy
 
C++ projct
C++ projctC++ projct
C++ projctJ M
 
Tic tac toe on c++ project
Tic tac toe on c++ projectTic tac toe on c++ project
Tic tac toe on c++ projectUtkarsh Aggarwal
 
Ortulympics 2012 lower sec soccer fixtures v1.1
Ortulympics 2012 lower sec soccer fixtures v1.1Ortulympics 2012 lower sec soccer fixtures v1.1
Ortulympics 2012 lower sec soccer fixtures v1.1y11hci0255
 
شيتات الواجب المنزلى maths الصف الأول الابتدائى ترم أول
شيتات الواجب المنزلى maths الصف الأول الابتدائى ترم أولشيتات الواجب المنزلى maths الصف الأول الابتدائى ترم أول
شيتات الواجب المنزلى maths الصف الأول الابتدائى ترم أولأمنية وجدى
 
Deccan rummy – how to play points rummy?
Deccan rummy – how to play points rummy?Deccan rummy – how to play points rummy?
Deccan rummy – how to play points rummy?DeccanRummy
 
Hitting a home run factorising
Hitting a home run factorisingHitting a home run factorising
Hitting a home run factorisingAngela Phillips
 
Tic tac toe c++ programing
Tic tac toe c++ programingTic tac toe c++ programing
Tic tac toe c++ programingKrishna Agarwal
 
Deccan rummy – how to play indian rummy?
Deccan rummy – how to play indian rummy?Deccan rummy – how to play indian rummy?
Deccan rummy – how to play indian rummy?DeccanRummy
 

What's hot (20)

Programming the BBC micro:bit with MicroPython by Dunham High School
Programming the BBC micro:bit with MicroPython by Dunham High SchoolProgramming the BBC micro:bit with MicroPython by Dunham High School
Programming the BBC micro:bit with MicroPython by Dunham High School
 
The Bingo Glossary
The Bingo GlossaryThe Bingo Glossary
The Bingo Glossary
 
Pre-Alg 6.1 Positive Integers
Pre-Alg 6.1 Positive IntegersPre-Alg 6.1 Positive Integers
Pre-Alg 6.1 Positive Integers
 
اختبارات maths للصف الثالث الابتدائى نصف العام 2015
اختبارات maths للصف الثالث الابتدائى نصف العام 2015  اختبارات maths للصف الثالث الابتدائى نصف العام 2015
اختبارات maths للصف الثالث الابتدائى نصف العام 2015
 
Deccan rummy – how to play pool rummy?
Deccan rummy – how to play pool rummy?Deccan rummy – how to play pool rummy?
Deccan rummy – how to play pool rummy?
 
C++ projct
C++ projctC++ projct
C++ projct
 
Volleyball fertig
Volleyball fertigVolleyball fertig
Volleyball fertig
 
Tic tac toe on c++ project
Tic tac toe on c++ projectTic tac toe on c++ project
Tic tac toe on c++ project
 
Deals Rummy
Deals Rummy Deals Rummy
Deals Rummy
 
Ortulympics 2012 lower sec soccer fixtures v1.1
Ortulympics 2012 lower sec soccer fixtures v1.1Ortulympics 2012 lower sec soccer fixtures v1.1
Ortulympics 2012 lower sec soccer fixtures v1.1
 
شيتات الواجب المنزلى maths الصف الأول الابتدائى ترم أول
شيتات الواجب المنزلى maths الصف الأول الابتدائى ترم أولشيتات الواجب المنزلى maths الصف الأول الابتدائى ترم أول
شيتات الواجب المنزلى maths الصف الأول الابتدائى ترم أول
 
Deccan rummy – how to play points rummy?
Deccan rummy – how to play points rummy?Deccan rummy – how to play points rummy?
Deccan rummy – how to play points rummy?
 
Geometrical_1
Geometrical_1Geometrical_1
Geometrical_1
 
efy-articles
efy-articlesefy-articles
efy-articles
 
Numbers-Exercises
Numbers-Exercises Numbers-Exercises
Numbers-Exercises
 
Hitting a home run factorising
Hitting a home run factorisingHitting a home run factorising
Hitting a home run factorising
 
Triangles_forms_hexagon
Triangles_forms_hexagonTriangles_forms_hexagon
Triangles_forms_hexagon
 
Tic tac toe c++ programing
Tic tac toe c++ programingTic tac toe c++ programing
Tic tac toe c++ programing
 
Board game battleship planes
Board game   battleship planesBoard game   battleship planes
Board game battleship planes
 
Deccan rummy – how to play indian rummy?
Deccan rummy – how to play indian rummy?Deccan rummy – how to play indian rummy?
Deccan rummy – how to play indian rummy?
 

Viewers also liked

Area de trapezoide_powerpoint
Area de trapezoide_powerpointArea de trapezoide_powerpoint
Area de trapezoide_powerpointArazelii Puentez
 
RAHUL_RAI_New
RAHUL_RAI_NewRAHUL_RAI_New
RAHUL_RAI_NewRahul Rai
 
Advocamp: Jim Williams
Advocamp: Jim WilliamsAdvocamp: Jim Williams
Advocamp: Jim WilliamsInfluitive
 
Le chien Ours de Carelie Standard FCI N° 48
Le chien Ours de Carelie Standard FCI N° 48Le chien Ours de Carelie Standard FCI N° 48
Le chien Ours de Carelie Standard FCI N° 48usbeck
 
Work Isn't Working: The Future of Work 2016 Report
Work Isn't Working: The Future of Work 2016 ReportWork Isn't Working: The Future of Work 2016 Report
Work Isn't Working: The Future of Work 2016 ReportNOBL
 
Future of AI-powered automation in business
Future of AI-powered automation in businessFuture of AI-powered automation in business
Future of AI-powered automation in businessLouis Dorard
 
Etude e-assurance : bilan chiffré, projets des assureurs, meilleures pratique...
Etude e-assurance : bilan chiffré, projets des assureurs, meilleures pratique...Etude e-assurance : bilan chiffré, projets des assureurs, meilleures pratique...
Etude e-assurance : bilan chiffré, projets des assureurs, meilleures pratique...CCM Benchmark Institut
 
Single View of the Customer - Digital Insurance in India
Single View of the Customer - Digital Insurance in IndiaSingle View of the Customer - Digital Insurance in India
Single View of the Customer - Digital Insurance in IndiaThe Digital Insurer
 

Viewers also liked (12)

Area de trapezoide_powerpoint
Area de trapezoide_powerpointArea de trapezoide_powerpoint
Area de trapezoide_powerpoint
 
Environmental Engineering Services
Environmental Engineering ServicesEnvironmental Engineering Services
Environmental Engineering Services
 
RAHUL_RAI_New
RAHUL_RAI_NewRAHUL_RAI_New
RAHUL_RAI_New
 
Advocamp: Jim Williams
Advocamp: Jim WilliamsAdvocamp: Jim Williams
Advocamp: Jim Williams
 
Practica3
Practica3Practica3
Practica3
 
Malice in Wonderland
Malice in WonderlandMalice in Wonderland
Malice in Wonderland
 
Le chien Ours de Carelie Standard FCI N° 48
Le chien Ours de Carelie Standard FCI N° 48Le chien Ours de Carelie Standard FCI N° 48
Le chien Ours de Carelie Standard FCI N° 48
 
Què veiem i què revisem
Què veiem i què revisemQuè veiem i què revisem
Què veiem i què revisem
 
Work Isn't Working: The Future of Work 2016 Report
Work Isn't Working: The Future of Work 2016 ReportWork Isn't Working: The Future of Work 2016 Report
Work Isn't Working: The Future of Work 2016 Report
 
Future of AI-powered automation in business
Future of AI-powered automation in businessFuture of AI-powered automation in business
Future of AI-powered automation in business
 
Etude e-assurance : bilan chiffré, projets des assureurs, meilleures pratique...
Etude e-assurance : bilan chiffré, projets des assureurs, meilleures pratique...Etude e-assurance : bilan chiffré, projets des assureurs, meilleures pratique...
Etude e-assurance : bilan chiffré, projets des assureurs, meilleures pratique...
 
Single View of the Customer - Digital Insurance in India
Single View of the Customer - Digital Insurance in IndiaSingle View of the Customer - Digital Insurance in India
Single View of the Customer - Digital Insurance in India
 

Similar to Project 2

In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdfIn Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdfanjandavid
 
This is a homework assignment that I have for my Java coding class. .pdf
This is a homework assignment that I have for my Java coding class. .pdfThis is a homework assignment that I have for my Java coding class. .pdf
This is a homework assignment that I have for my Java coding class. .pdffeelinggift
 
Need to make a ReversiOthello Board game in JAVAThe board size ca.pdf
Need to make a ReversiOthello Board game in JAVAThe board size ca.pdfNeed to make a ReversiOthello Board game in JAVAThe board size ca.pdf
Need to make a ReversiOthello Board game in JAVAThe board size ca.pdfflashfashioncasualwe
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfasif1401
 
#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdfaquacareser
 
#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdfaquapariwar
 
The following is my code for a connectn program. When I run my code .pdf
The following is my code for a connectn program. When I run my code .pdfThe following is my code for a connectn program. When I run my code .pdf
The following is my code for a connectn program. When I run my code .pdfeyelineoptics
 
Here is the code for youimport java.util.Scanner; import java.u.pdf
Here is the code for youimport java.util.Scanner; import java.u.pdfHere is the code for youimport java.util.Scanner; import java.u.pdf
Here is the code for youimport java.util.Scanner; import java.u.pdfanithareadymade
 
package com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfpackage com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfinfo430661
 
PLEASE can do this in NETBEAN I need that way thank very muchManca.pdf
PLEASE can do this in NETBEAN I need that way thank very muchManca.pdfPLEASE can do this in NETBEAN I need that way thank very muchManca.pdf
PLEASE can do this in NETBEAN I need that way thank very muchManca.pdfkennithdase
 
public interface Game Note interface in place of class { .pdf
public interface Game  Note interface in place of class { .pdfpublic interface Game  Note interface in place of class { .pdf
public interface Game Note interface in place of class { .pdfkavithaarp
 
Utility Classes Are Killing Us
Utility Classes Are Killing UsUtility Classes Are Killing Us
Utility Classes Are Killing UsYegor Bugayenko
 
0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptx0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptxAhishektttPhm
 

Similar to Project 2 (15)

In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdfIn Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
 
This is a homework assignment that I have for my Java coding class. .pdf
This is a homework assignment that I have for my Java coding class. .pdfThis is a homework assignment that I have for my Java coding class. .pdf
This is a homework assignment that I have for my Java coding class. .pdf
 
Need to make a ReversiOthello Board game in JAVAThe board size ca.pdf
Need to make a ReversiOthello Board game in JAVAThe board size ca.pdfNeed to make a ReversiOthello Board game in JAVAThe board size ca.pdf
Need to make a ReversiOthello Board game in JAVAThe board size ca.pdf
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdf
 
#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf
 
#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf
 
The following is my code for a connectn program. When I run my code .pdf
The following is my code for a connectn program. When I run my code .pdfThe following is my code for a connectn program. When I run my code .pdf
The following is my code for a connectn program. When I run my code .pdf
 
p.pdf
p.pdfp.pdf
p.pdf
 
Here is the code for youimport java.util.Scanner; import java.u.pdf
Here is the code for youimport java.util.Scanner; import java.u.pdfHere is the code for youimport java.util.Scanner; import java.u.pdf
Here is the code for youimport java.util.Scanner; import java.u.pdf
 
package com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfpackage com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdf
 
PLEASE can do this in NETBEAN I need that way thank very muchManca.pdf
PLEASE can do this in NETBEAN I need that way thank very muchManca.pdfPLEASE can do this in NETBEAN I need that way thank very muchManca.pdf
PLEASE can do this in NETBEAN I need that way thank very muchManca.pdf
 
public interface Game Note interface in place of class { .pdf
public interface Game  Note interface in place of class { .pdfpublic interface Game  Note interface in place of class { .pdf
public interface Game Note interface in place of class { .pdf
 
Utility Classes Are Killing Us
Utility Classes Are Killing UsUtility Classes Are Killing Us
Utility Classes Are Killing Us
 
0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptx0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptx
 
python.pptx
python.pptxpython.pptx
python.pptx
 

Project 2

  • 2.  Game board is 8*8 fields.  There are numbers between -9 and 9 except 0.  Player can only move the cursor horizontally.  Computer/Player2 can only move the cursor vertically.  Collected numbers are added to their scores.  if there is no possible move no number in the row or coloumn, the game is over.
  • 3.
  • 4.
  • 5. EASY MODE  COMPUTER CAN ONLY CHOOSE LARGEST NUMBER IN THAT COLUMN.
  • 6. HARD MODE  IN THIS MODE, COMPUTER IS MORE INTELLIGENT BECAUSE OF US.  COMPUTER GUESS THAT YOU’LL CHOOSE NUMBERS.
  • 7.  IN THIS MODE YOU CAN PLAY AGAINST YOUR FRIENDS.
  • 8.  PLAYER AND COMPUTER MAY CHOOSE NULL POINT. move = Console.ReadKey(true); if (move.Key == ConsoleKey.D1) { j = 0; i = cursor_y - 1; …………………………… if(satir[i,j]==-10) Console.Write("--Null Point-- Enter A New Point!!"); }
  • 9.
  • 10.  PLAYER MAY PRESS UNVALID KEY. while (move.Key != ConsoleKey.NumPad1 & ……… & move.Key != ConsoleKey.NumPad8) { Console.Write(" Unvalid Chosen Key!! "); move = Console.ReadKey(true); }
  • 11.
  • 12.  RETURN IN NESTED MENU. if (menu1 == 1) { Console.WriteLine("1.EASY "); Console.WriteLine("2.HARD "); Console.WriteLine("3.BACK TO MENU"); menu2 = Convert.ToInt32(Console.ReadLine()); } Console.Clear(); } while (menu1 == 3 | menu2 == 3 | menu == 2);
  • 13.
  • 14.  if there is no possible move no number in the row or coloumn, the game is over. while(…….) { count = 0; for (b = 0; b < 8; b++) { if (satir[cursor_y - 1, b] == -10) count++; } if (count == 8) break; }
  • 15.  COMPUTER CAN FINISH THE GAME IF IT WIN. for (b = 0; b < 8; b++) { count = 0; for (d = 0; d < 8; d++) { if (satir[b, d] == -10 & satir[b, j] != -10) count++; if (count == 7) { cursor_y = b + 1; break; } }
  • 16.  PROBLEMS ABOUT A.I for (b = 0; b < 8; b++) { number1 = -20; for (d = 0; d < 8; d++) { if ((number1 < satir[b, d]) & (satir[b, d] != -10) & (d != j)) { number1 = satir[b, d]; e = b; f = d; } } if ((number2 < satir[b, j] - satir[e, f]) & (satir[b, j] != -10)) { number2 = satir[b, j] - satir[e, f]; cursor_y = b + 1; } }
  • 17. System.Threading.Thread.Sleep(1000); Console.Beep(); Try and Catch code. MAKE A MENU CREATE AN ARTIFICIAL INTELLEGENCE
  • 18.
  • 19.  www.csharpnedir.com  www.socialmsdn.microsoft.com/forums  www.wikibooks.org  www.csharp-station.com  www.reddit.com/csharp