using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 五子棋
{
class Map
{
public void printMap(int[,] map)
{
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++)
{
switch (map[i, j])
{
case 0:
Console.Write("十");
break;
case 1:
Console.Write("●");
break;
case 2:
Console.Write("○");
break;
case 3:
Console.Write("■");
break;
}
}
Console.WriteLine();
}
}
public bool IsWin(int[,] map, int x, int y, int who)
{
int x_temp = x;
int y_temp = y;
bool _is = false;
int num = -1; //横向判断
while (map[x_temp, y_temp] == who)
{
num++;
x_temp++;
}
x_temp = x;
while (map[x_temp, y_temp] == who)
{
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 五子棋
{
class Map
{
public void printMap(int[,] map)
{
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++)
{
switch (map[i, j])
{
case 0:
Console.Write("十");
break;
case 1:
Console.Write("●");
break;
case 2:
Console.Write("○");
break;
case 3:
Console.Write("■");
break;
}
}
Console.WriteLine();
}
}
public bool IsWin(int[,] map, int x, int y, int who)
{
int x_temp = x;
int y_temp = y;
bool _is = false;
int num = -1; //横向判断
while (map[x_temp, y_temp] == who)
{
num++;
x_temp++;
}
x_temp = x;
while (map[x_temp, y_temp] == who)
{