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

Project 2

  • 1.
  • 2.
     Game boardis 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.
  • 5.
    EASY MODE  COMPUTERCAN ONLY CHOOSE LARGEST NUMBER IN THAT COLUMN.
  • 6.
    HARD MODE  INTHIS MODE, COMPUTER IS MORE INTELLIGENT BECAUSE OF US.  COMPUTER GUESS THAT YOU’LL CHOOSE NUMBERS.
  • 7.
     IN THISMODE YOU CAN PLAY AGAINST YOUR FRIENDS.
  • 8.
     PLAYER ANDCOMPUTER 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!!"); }
  • 10.
     PLAYER MAYPRESS UNVALID KEY. while (move.Key != ConsoleKey.NumPad1 & ……… & move.Key != ConsoleKey.NumPad8) { Console.Write(" Unvalid Chosen Key!! "); move = Console.ReadKey(true); }
  • 12.
     RETURN INNESTED 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);
  • 14.
     if thereis 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 CANFINISH 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 ABOUTA.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 Catchcode. MAKE A MENU CREATE AN ARTIFICIAL INTELLEGENCE
  • 19.
     www.csharpnedir.com  www.socialmsdn.microsoft.com/forums www.wikibooks.org  www.csharp-station.com  www.reddit.com/csharp