利用最基础的C语言绘制了一个简易的中国象棋棋盘,代码如下:
#include <stdio.h>
int main()
{
int i,j;
int map[19][18]=
{
{
'a',0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
{
'b',1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{
'c',0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
{
'b',1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{
'e',0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
{
'b',1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{
'g',0,1,0,1,0,1,0,1,0,1,0,1,0,1