예제 #1
0
void inisialisasi(place *tempat, player *p)
{
    int i;
    for(i=0;i<=19;i++)
    {
        strcpy((*tempat).tmpt[i].name,"");
        (*tempat).tmpt[i].hargabeli=0;
        (*tempat).tmpt[i].kompleks='0';
        (*tempat).tmpt[i].pemilik=0;
    }
    strcpy((*tempat).tmpt[0].name, "START");
    strcpy((*tempat).tmpt[1].name, "OKTAGON");
    (*tempat).tmpt[1].hargabeli=500000;
    (*tempat).tmpt[1].kompleks='1';
    strcpy((*tempat).tmpt[2].name, "COMLABS");
    (*tempat).tmpt[2].hargabeli=750000;
    (*tempat).tmpt[2].kompleks='1';
    strcpy((*tempat).tmpt[3].name, "TVST");
    (*tempat).tmpt[3].hargabeli=1200000;
    (*tempat).tmpt[3].kompleks='2';
    strcpy((*tempat).tmpt[4].name, "TELKOM");
    (*tempat).tmpt[4].hargabeli=1500000;
    (*tempat).tmpt[4].kompleks='2';
    strcpy((*tempat).tmpt[5].name, "PENJARA");
    strcpy((*tempat).tmpt[6].name, "K_BENGKOK");
    (*tempat).tmpt[6].hargabeli=3500000;
    (*tempat).tmpt[6].kompleks='K';
    strcpy((*tempat).tmpt[7].name, "KESEMPATAN");
    strcpy((*tempat).tmpt[8].name, "GKU_BARAT");
    (*tempat).tmpt[8].hargabeli=1900000;
    (*tempat).tmpt[8].kompleks='3';
    strcpy((*tempat).tmpt[9].name, "GKU_TIMUR");
    (*tempat).tmpt[9].hargabeli=2300000;
    (*tempat).tmpt[9].kompleks='3';
    strcpy((*tempat).tmpt[10].name, "UNDIAN");
    strcpy((*tempat).tmpt[11].name, "AULA_BARAT");
    (*tempat).tmpt[11].hargabeli=2700000;
    (*tempat).tmpt[11].kompleks='4';
    strcpy((*tempat).tmpt[12].name, "AULA_TIMUR");
    (*tempat).tmpt[12].hargabeli=3100000;
    (*tempat).tmpt[12].kompleks='4';
    strcpy((*tempat).tmpt[13].name, "KESEMPATAN");
    strcpy((*tempat).tmpt[14].name, "K_BARRACK");
    (*tempat).tmpt[14].hargabeli=3500000;
    (*tempat).tmpt[14].kompleks='K';
    strcpy((*tempat).tmpt[15].name, "BUS_ITB");
    strcpy((*tempat).tmpt[16].name, "KESEMPATAN");
    strcpy((*tempat).tmpt[17].name, "K_BORJU");
    (*tempat).tmpt[17].hargabeli=3500000;
    (*tempat).tmpt[17].kompleks='K';
    strcpy((*tempat).tmpt[18].name, "LABTEK_VIII");
    (*tempat).tmpt[18].hargabeli=3500000;
    (*tempat).tmpt[18].kompleks='6';
    strcpy((*tempat).tmpt[19].name, "LABTEK_V");
    (*tempat).tmpt[19].hargabeli=4000000;
    (*tempat).tmpt[19].kompleks='6';
    for(i=0;i<=19;i++)
    {
        (*tempat).tmpt[i].letak=urutantopoint(i);
    }
    inisiasipemain(&(*p));
    blankall(&(m));
}
예제 #2
0
파일: optout.c 프로젝트: tridge/junkcode
void showall()
{
int	pageint;
celltype cell;
if (page == PAGEUP || sys.screen == SCREEN2) pageint = 0;
else pageint = 15;
blankall();
textcolor(sys.graphics.colors.data);
textbackground(sys.graphics.colors.databack);
switch (sys.screen)
{
case SCREEN1 :
      for(cell.row=8+pageint ;cell.row<=22 +pageint ;cell.row++)
	{
	for(cell.col=MONTH;cell.col<=VALUEP;cell.col++)
	showcell(cell);
	if (sys.display == HELDS)
		{
		cell.col = HELDC;
		showcell(cell);
		cell.col = HELDP;
		showcell(cell);
		}
	else
		{
		cell.col = DELTAC;
		showcell(cell);
		cell.col = DELTAP;
		showcell(cell);
		}
	}
	break;
case SCREEN2 :
	for(cell.row=8;cell.row<=22;cell.row++)
	for(cell.col=YEARMONTH;cell.col<=DIVIDENDCENTS;cell.col++)
	showcell(cell);
	break;
case SCREEN3 :
      for(cell.row=8+pageint ;cell.row<=22 +pageint ;cell.row++)
	{
	for (cell.col=MONTH;cell.col<=STRIKE;cell.col++)
	showcell(cell);
	for (cell.col=MARKETC;cell.col<=MARKETP;cell.col++)
	showcell(cell);
	if (sys.display == INVVOL)
	  {	for (cell.col=VOLC;cell.col<=VOLP;cell.col++)
              showcell(cell);
	  }
	else
	if (sys.display == OVERVALUED)
	  {	for (cell.col=COVERVAL;cell.col<=POVERVAL;cell.col++)
              showcell(cell);
	  }
	}
	break;
}
cell.row=2;
cell.col = DATE;
showcell(cell);
cell.col = INTEREST;
showcell(cell);
cell.row=3;
cell.col =SHAREPRICE;
showcell(cell);
cell.col = VOLATILITY;
showcell(cell);
cell.col = STOCKHELD;
cell.row = 4;
showcell(cell);
wait();
ready();
}