Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

8q.c File Reference

Go to the source code of this file.

Functions

 main ()
int print ()
 queens (c)
int queens ()

Variables

int down [15]
int rows [8]
int up [15]
int x [8]


Function Documentation

main  ) 
 

Definition at line 4 of file 8q.c.

References down, i, queens(), rows, and up.

00005 {
00006     int i;
00007 
00008     for (i = 0; i < 15; i++)
00009         up[i] = down[i] = 1;
00010     for (i = 0; i < 8; i++)
00011         rows[i] = 1;
00012     queens(0);
00013     return 0;
00014 }

Here is the call graph for this function:

print  ) 
 

Definition at line 32 of file 8q.c.

References k, printf(), and x.

Referenced by dbxout(), dumptree(), emitasm(), emitcase(), emitclosure(), emitCoord(), emitcost(), emitdefs(), emitheader(), emitkids(), emitlabel(), emitnts(), emitrecalc(), emitrecord(), emitrule(), emitString(), emitstring(), emitstruct(), emitSymbol(), emitSymRef(), emittest(), emittype(), LoadSourceFile(), main(), print(), PrintToSourceLine(), queens(), stabblock(), stabend(), stabinit(), stabline(), stabsym(), stabtype(), yyBEGIN(), and yyEND().

00033 {
00034     int k;
00035 
00036     for (k = 0; k < 8; k++)
00037         printf("%c ", x[k]+'1');
00038     printf("\n");
00039 }

Here is the call graph for this function:

queens  ) 
 

Definition at line 16 of file 8q.c.

References c, down, print(), queens(), r, rows, up, and x.

00017 {
00018     int r;
00019 
00020     for (r = 0; r < 8; r++)
00021         if (rows[r] && up[r-c+7] && down[r+c]) {
00022             rows[r] = up[r-c+7] = down[r+c] = 0;
00023             x[c] = r;
00024             if (c == 7)
00025                 print();
00026             else
00027                 queens(c + 1);
00028             rows[r] = up[r-c+7] = down[r+c] = 1;
00029         }
00030 }

Here is the call graph for this function:

int queens  ) 
 

Referenced by main(), and queens().


Variable Documentation

int down[15]
 

Definition at line 1 of file 8q.c.

Referenced by _UI_KeyEvent(), AAS_Reachability_Grapple(), CG_KeyEvent(), CL_KeyEvent(), Display_HandleKey(), Item_Bind_HandleKey(), Item_HandleKey(), main(), Menu_HandleKey(), Menu_ScrollFeeder(), Menus_HandleOOBClick(), PM_StepSlideMove(), and queens().

int rows[8]
 

Definition at line 1 of file 8q.c.

Referenced by Con_DrawSolidConsole(), do_barray_io(), do_sarray_io(), LoadBMP(), LoadTGA(), LoadTGABuffer(), main(), queens(), RB_SurfaceGrid(), RE_StretchRaw(), and RE_UploadCinematic().

int up[15]
 

Definition at line 1 of file 8q.c.

Referenced by AAS_AreaGroundFace(), AAS_ClientMovementPrediction(), AAS_CreateArea(), AAS_DrawArrow(), AAS_OnGround(), AAS_Reachability_Jump(), AAS_Reachability_Ladder(), AngleVectors(), AutospriteDeform(), BotAIBlocked(), BotAttackMove(), BotCheckBlocked(), BotImport_DebugLineShow(), BotOnTopOfEntity(), BotReachabilityArea(), Brush_DrawFacingAngle(), CEpairsWrapper::CalculateRotatedBounds(), CCamWnd::Cam_ChangeFloor(), CG_AddScorePlum(), CG_DamageFeedback(), CG_EntityEvent(), CG_GrappleTrail(), CG_OffsetFirstPersonView(), CG_OffsetThirdPersonView(), CG_RocketTrail(), CG_ShotgunFire(), CG_ShotgunPattern(), CL_KeyMove(), CM_EdgePlaneNum(), CM_TransformedPointContents(), DebugLine(), DoRailCore(), DoRailDiscs(), FacingVectors(), G_TryPushingProxMine(), main(), MakeNormalVectors(), PM_StepSlideMove(), queens(), RB_AddQuadStamp(), RB_AddQuadStampExt(), RB_SurfaceFlare(), RB_SurfaceRailRings(), RB_SurfaceSprite(), angles_t::toVectors(), Use_Shooter(), ValidBloodPool(), and CXYWnd::XY_MouseDown().

int x[8]
 

Definition at line 1 of file 8q.c.


Generated on Thu Aug 25 15:57:03 2005 for Quake III Arena by  doxygen 1.3.9.1